Kai Tietz <ktiet...@googlemail.com> writes:

> New testcase in g++.dg/cpp1y as pr63996.C
>
> // { dg-do compile { target c++14 } }
>
> constexpr int
> foo (int i)
> {
>   int a[i] = { };
> }
>
> constexpr int j = foo (1); // { dg-error "is not a constant expression" }

FAIL: g++.dg/cpp1y/pr63996.C  -std=c++14 (test for excess errors)
Excess errors:
/usr/local/gcc/gcc-20141214/gcc/testsuite/g++.dg/cpp1y/pr63996.C:6:10: error: 
ISO C++ forbids variable length array 'a' [-Wvla]

Andreas.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

Reply via email to