suppress warnings in source code

Tibor Vidók tibor.vidok@gmail.com
Wed Nov 11 12:25:00 GMT 2009


Hi all!

Is it possible somehow to suppress some gcc warnings regardless the
-Wxxx command line options?

Our program is a mixture of 3pp code and code written by ourselves,
and the way of working requires the following conflicting design
rules:
- have to use a given set of -Wxxx options
- Code written by ourself must compile without warnings
- 3pp code should be modified as little as possible because of
patching/upgrading
- Because of paranoid -W options, warnings from unchanged 3pp code
should be ignored, but warnings from our modifications within the 3pp
code must be eliminated.

Now we have lot's of warning from 3pp code which we checked, but not
fixed. On the other hand, it is really impossible to find new warnings
which we need to fixed between the other warnings.

I have found an  attributes for unused functions or parameters but nothing else.
Is there any attributes or pragmas  which suppresses other warnings
(like castings, initializations, etc) or warnings from a given line ?

Thanks for your help!
Tibor Vidok



More information about the Gcc-help mailing list