llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
26.2k stars 10.72k forks source link

-Wno-vla not supported #2880

Closed llvmbot closed 15 years ago

llvmbot commented 15 years ago
Bugzilla Link 2508
Resolution INVALID
Resolved on Jul 01, 2008 03:08
Version trunk
OS Linux
Reporter LLVM Bugzilla Contributor
CC @asl

Extended Description

$ llvm-g++ -Wvla x.cpp cc1plus: error: unrecognized command line option "-Wvla"

It'd be great if llvm-g++ would support the -Wvla (and -Wno-vla) option.

llvmbot commented 15 years ago

Personally I'd rather work on porting llvm to gcc-4.4...

llvmbot commented 15 years ago

It's a GCC 4.3 feature, so it'd require an independent reimplementation, but I understand that such a reimplementation should be relatively simple for someone familiar with gcc.

asl commented 15 years ago

$ llvm-g++ -Wvla x.cpp cc1plus: error: unrecognized command line option "-Wvla"

It'd be great if llvm-g++ would support the -Wvla (and -Wno-vla) option. This seems to be not supported even by mainline gcc:

$ gcc -v Using built-in specs. Target: i686-pc-linux-gnu Configured with: /var/tmp/portage/sys-devel/gcc-4.2.2/work/gcc-4.2.2/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.2.2 --includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.2.2/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.2.2 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.2.2/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.2.2/info --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.2.2/include/g++-v4 --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --enable-secureplt --disable-libunwind-exceptions --disable-multilib --enable-libmudflap --disable-libssp --disable-libgcj --with-arch=i686 --enable-languages=c,c++,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu Thread model: posix gcc version 4.2.2 (Gentoo 4.2.2 p1.0)

$ touch foo.c && gcc -Wvla foo.c cc1: error: unrecognized command line option "-Wvla"