This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFA: C/ObjC/C++ options handling take 2
- From: Fergus Henderson <fjh at cs dot mu dot OZ dot AU>
- To: Neil Booth <neil at daikokuya dot co dot uk>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 3 Aug 2002 11:38:08 +1000
- Subject: Re: RFA: C/ObjC/C++ options handling take 2
- References: <20020802232302.GA27170@daikokuya.co.uk>
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.