This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/64666] gcc wrongly accepts assignment in constant expression


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]