This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Suppressing specific compiler warnings
- From: Ranjit Mathew <rmathew at gmail dot com>
- To: Banibrata Dutta <dutta at india dot hp dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 26 May 2004 13:55:26 +0530
- Subject: Re: Suppressing specific compiler warnings
- References: <002f01c442fa$1091bbe0$c0714c0f@nt13192>
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/