https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67236
Bug ID: 67236 Summary: Wrong Message of -Wvla for Standard ISO C90 However Emitted with -std=c11 Product: gcc Version: 6.0 Status: RESOLVED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: chengniansun at gmail dot com CC: mpolacek at gcc dot gnu.org Target Milestone: --- Status: RESOLVED CC: mpolacek at gcc dot gnu.org Resolution: DUPLICATE When I compile the code "int array[4.3];", in addition to the error, GCC also emits a -Wvla warning saying that ISO C90 forbids this. However, I specify -std=c11 in the command line, and IMHO this is at least an inconsistency between errors and error messages. $: cat t.c int array[4.3]; $: gcc-trunk -c -Wvla -std=c11 -pedantic t.c t.c:1:5: error: size of array ‘array’ has non-integer type int array[4.3]; ^ t.c:1:1: warning: variably modified ‘array’ at file scope int array[4.3]; ^ t.c:1:1: warning: ISO C90 forbids array ‘array’ whose size can’t be evaluated [-Wvla] $: gcc-trunk -v Using built-in specs. COLLECT_GCC=gcc-trunk COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/6.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-trunk/configure --enable-languages=c,c++,objc,obj-c++,fortran,lto --disable-werror --with-gmp=/usr/local/gcc-trunk --with-mpfr=/usr/local/gcc-trunk --with-mpc=/usr/local/gcc-trunk --with-cloog=/usr/local/gcc-trunk --prefix=/usr/local/gcc-trunk Thread model: posix gcc version 6.0.0 20150815 (experimental) [trunk revision 226911] (GCC) $: --- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> --- . *** This bug has been marked as a duplicate of bug 67243 ***