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.