This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/64666] gcc wrongly accepts assignment in constant expression
- From: "dcb314 at hotmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 19 Jan 2015 17:23:28 +0000
- Subject: [Bug c++/64666] gcc wrongly accepts assignment in constant expression
- Auto-submitted: auto-generated
- References: <bug-64666-4 at http dot gcc dot gnu dot org/bugzilla/>
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.