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: C/ObjC/C++ options handling take 2


On 03-Aug-2002, Neil Booth <neil@daikokuya.co.uk> wrote:
> This fixes a couple of issues, and improves the diagnostics.
> 
> $./cc1plus -Wnested-externs /tmp/foo.c
> $ cc1plus: error: "-Wnested-externs" is valid for C/ObjC but not for C++

I think it would be more friendly to issue warnings rather than
errors for unrecognized options like this.

Previously "g++ -Wnested-externs" did not complain.
If you make it report an error, then this will probably break
some existing Makefiles which include options such as -Wnested-externs
in CFLAGS (for C), and pass $(CFLAGS) to g++.
It would be much nicer to just issue a warning, and give
developers time to update their Makefiles, rather than
suddenly breaking them and causing users inconvenience
when they can't build old packages with new versions of gcc.

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.


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