This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]