c++ - How to disable warnings for system headers in Sun Studio 12 -


we're in middle of tidying our codebase (among other things) fixing compiler warnings.

the end goal turn on flag converts warnings errors. we've run slight snag system , thirdparty headers. of system headers cause various compilers emit warnings. can't go modifying system headers fix warnings.

with intel compiler (and gcc) use -isystem instead of -i when building include path tell compilers headers in dirs system headers , stops warning them. it's simple matter of turning on -werror flag.

we're using sun studio 12, flag -errwarn=%all should equivalent of -werror, can't find way tell compiler ignore warnings in system / thirdparty headers. there -errhdr flag, doesn't seem want.

does know how accomplish sun studio 12?

obviously, isn't want in absence of better wrap offending includes in #pragma error_messages block. e.g.

#pragma error_messages (on , tag .. tag)  #include <map> // etc  #pragma error_messages (default , tag .. tag) 

as described here. don't have access solaris haven't tried this.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -