Skylark wrote: > > Where: > > HeaderStart: > > #if defined(_MSC_VER) %% defined(OSG_DISABLE_MSVC_WARNINGS) > #pragma warning(push) > #pragma warning(disable: a b c d e f g) > #endif > > HeaderEnd: > > #if defined(_MSC_VER) %% defined(OSG_DISABLE_MSVC_WARNINGS) > #pragma warning(pop) > #endif >
You can actually roll the pragamas all up into two macros - one to "begin" (push+disable) and one to "end". e.g., in a common header, (osg/Export or whatever), include the following block: #ifdef _MSC_VER #define SUPPRESS_WARNINGS __pragma (warning(push)) __pragma (warning(disable : a b c d)) #define POP_WARNINGS __pragma (warning(pop)) #else #define SUPPRESS_WARNINGS #define POP_WARNINGS #endif Now, obviously, you could also define these macros to selectively suppress warnings in other compilers by including proper conditional switches for each in the above block. I myself do this often, and have a common "macros" header, which gets included pretty much everywhere, for this purpose (it also defines macros for declaration specifiers and other compiler- or OS-specific code features). ------------------------ Matthew W Fuesz Software Engineer Asc Lockheed Martin STS ------------------ Read this topic online here: http://osgforum.tevs.eu/viewtopic.php?p=6004#6004 _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org