This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

missing lang-options.h for language 'c'



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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]