This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Warnings in the C++ Front-End and GCC in General
- To: mark at markmitchell dot com, egcs-patches at cygnus dot com
- Subject: Re: Warnings in the C++ Front-End and GCC in General
- From: Richard Henderson <rth at cygnus dot com>
- Date: Mon, 7 Sep 1998 19:24:36 -0700
- Cc: egcs at cygnus dot com, Jason Merrill <jason at cygnus dot com>
- References: <199809070744.AAA11440@smtp.earthlink.net>
- Reply-To: Richard Henderson <rth at cygnus dot com>
On Mon, Sep 07, 1998 at 12:44:54AM -0700, Mark Mitchell wrote:
> This patch addresses a long-standing need in GCC: the ability to
> disable individual warnings.
I don't necesarily agree that it is a need at all, but...
> This patch provides, for every C++ warning/error message, a unique
> number.
By number is particularly odious. One, now we've got to manage
numbers. Two, we've got to preserve numbers from revision to
revision -- they've just been enshrined as part of the GNU C API.
In all, it sounds like a maintenance nightmare.
This could be partially mitigated by using small, cryptic keywords
instead, but I'm not sure how much that buys us either.
> It is basically a mistake to use `#pragma' for *anything*.
>
> I believe this to be an over-statement. For this particular
> situation, I think `#pragma' is the way to go.
This is largely mitigated by ISO C9x's _Pragma() which can in fact
be used within macros. Though it still does little for actual
portability. Not that __attribute__ or anything else does either...
As for i18n, there are better ways to go about this. Tom Tromey
has done the work for gcc2; at some point I presume we'll import
all of that into egcs.
In all, I rather feel that this is one of those things that sounds
like a good idea but really isn't.
r~