This is the mail archive of the gcc@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]

Re: merging C and C++ options


On Wed, 14 Feb 2001, Matt Kraai wrote:

> I'm trying to merge the -Wreturn-type flag, which is used in both
> C and C++, into c-common.[ch] as suggested on the Simple GCC
> projects page.  In order to do so, it appears that one must do the
> following:

This particular option is a backend option rather than just a C/C++ one
(as shown by its use in the backend file flow.c).  Thus, what should be
done is:

>  * remove the description from the language specific section (in
>    this case in cp/lang-options.h)
>  * add the description to the common flags section in toplev.c
>  * remove the declaration from cp/cp-tree.h (since it includes
>    c-common.h)

and the option should move to W_options in toplev.c, instead of the option
parsing code in the C/C++ front ends.

-- 
Joseph S. Myers
jsm28@cam.ac.uk


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