https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70075

--- Comment #3 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Eric Gallager from comment #2)
> 
> I get this output on i386-apple-darwin9.8.0 with gcc8:
> 
> $ /usr/local/bin/g++ -Wall -Wextra -Wpedantic -o 70075.exe 70075.cc
> 70075.cc: In function ‘void bar(int)’:
> 70075.cc:4:13: warning: ISO C++ forbids variable length array ‘a’ [-Wvla]
>   char a[m][n] = { { 0, 1, 2 } };
>              ^
> $ ./70075.exe
> 0 1 2 0 0 0 -32 -113 
> $
> 
> (i.e. no errors)

Running the program on x86_64-apple-darwin10.8.0 with gcc9, it prints this
instead:
0 1 2 0 9 0 0 0
(still no errors though)

Reply via email to