This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: RFA: Handle C, ObjC and C++ options in one place


Neil Booth wrote:-

> Next stage is to start moving the handling out of cpplib into
> c-opts.c, the new file in this patch, so that everything is
> done in one place, with just one lookup rather than two.  That
> would also do a good job of reducing and cleaning up cpplib's
> exposed interface.

I forgot to mention: the code automatically handles the
negative versions of -f and -W options; they don't need to be
specified separately (the parser in cppinit.c is a little less
sophisticated, and requires you to specify both).  However,
you can still reject the no- versions if you really don't want
them for some reason.

A side effect is that -Wno-all is now accepted in C (previously
only C++ accepted it).

Also, if you pass a switch to say C++ that is C only, it tells
you that the switch is valid for other languages, but not C++.

The code handles arguments that are joined or separated or both.

Neil.


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