This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Local disable of specific warnings for a section of code
- From: John Love-Jensen <eljay at adobe dot com>
- To: Lee Rhodes <lee at rhoba dot com>, MSX to GCC <gcc-help at gcc dot gnu dot org>
- Date: Wed, 29 Aug 2007 09:15:29 -0500
- Subject: Re: Local disable of specific warnings for a section of code
Hi Lee,
> In general I like have all warnings active, however, I have certain sections
> of code where I know a warning will be generated, but I don't want these
> warnings to clutter my build output. Is there a solution for this?
Yes.
You can use a post-process on the build output to selectively strip out
warnings that you have determined are ignorable noise.
Perl is one good tool to do that post-processing filter. Other good tools
to consider are sed, grep, awk, Python, Ruby. (This list is by no means
exhaustive!)
HTH,
--Eljay