[Bug c++/64666] gcc wrongly accepts assignment in constant expression
dcb314 at hotmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Jan 19 17:23:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64666
--- Comment #2 from David Binderman <dcb314 at hotmail dot com> ---
(In reply to Andrew Pinski from comment #1)
> VLA is a gcc extension.
I added switch -std=c++98 and it made no change.
I added -pedantic and I got the vla warning.
jan19g.cc:6:14: warning: ISO C++ forbids variable length array ‘a’ [-Wvla]
int a[ j = i];
^
Still nothing about assignment not allowed in constant expression.
More information about the Gcc-bugs
mailing list