This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
missing lang-options.h for language 'c'
- To: gcc-bugs at gcc dot gnu dot org
- Subject: missing lang-options.h for language 'c'
- From: Bruno Haible <haible at ilog dot fr>
- Date: Tue, 2 May 2000 16:25:26 +0200 (MET DST)
Hi,
Just built gcc-2.95.2 from source, configured with option --enable-languages=
(or --enable-languages=c - it makes no difference). This compiler does not
understand the documented option "-Wreturn-type".
$ gcc comment5.i -Wreturn-type
cc1: Invalid option `-Wreturn-type'
$ /home/bin/build-gcc/gcc/stage1/cc1 comment5.i -quiet -Wreturn-type
cc1: Invalid option `-Wreturn-type'
This option is rejected even before c-decl.c:c_decode_option() has a
chance to process it. Apparently in compilers configured with C++ support
the existence of "-Wreturn-type" in gcc/cp/lang-options.h validates it
for cc1 as well (see comment at toplev.c:4906).
So either -Wreturn-type is a language independent option, then it should
be added to the documented_lang_options array in toplev.c.
Or it is a C specific option, then a file gcc/lang-options.h file should
be created that contains it (just like gcc/cp/lang-options.h).
Bruno