This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Suppressing specific compiler warnings
- From: "Banibrata Dutta" <dutta at india dot hp dot com>
- To: "'Ranjit Mathew'" <rmathew at gmail dot com>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Wed, 26 May 2004 14:15:41 +0530
- Subject: RE: Suppressing specific compiler warnings
Hi Ranjit:
Thanks for pointing it out. I'd seen the -Wno-xxx so many times,
but never thought about the reason for using it.
BTW, wouldn't it be a good feature if all warnings (and errors)
were numbered, s.t. final warning (or error) displayed is something
like a --
<number>: <warning/error message>
And then have option like -Wno-<number>... Something quite similar
to the HP compilers!
Also, this would make the process of internationalization of gcc/g++
easy.
Thanks & regards,
Banibrata Dutta
> -----Original Message-----
> From: Ranjit Mathew [mailto:rmathew@gmail.com]
> Sent: Wednesday, May 26, 2004 1:55 PM
> To: Banibrata Dutta
> Cc: gcc@gcc.gnu.org
> Subject: Re: Suppressing specific compiler warnings
>
>
> Banibrata Dutta wrote:
> > Hi,
> >
> > I've wondered for a long time as to why the ability to suppress
> > specific compiler warnings is missing in GCC. Has this ever been
> > discussed ? Having this would be very useful in cases where
> we treat
> > warnings and errors and cause build to break. At times there are
> > warnings which we decide to live with, because they reflect a
> > deliberate decision.
>
> See:
>
http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
Useful snippet:
"You can request many specific warnings with options
beginning -W, for example -Wimplicit to request warnings
on implicit declarations. Each of these specific warning
options also has a negative form beginning -Wno- to turn
off warnings; for example, -Wno-implicit. This manual
lists only one of the two forms, whichever is not the
default."
Ranjit.
--
Ranjit Mathew Email: rmathew AT gmail DOT com
Bangalore, INDIA. Web: http://ranjitmathew.tripod.com/