On 2 April 2012 11:50, Daniel P. Berrange <berra...@redhat.com> wrote: > +#if defined __GNUC__ > +# define GCC_WARNINGS_SAVE _Pragma("GCC diagnostic push") > +# define GCC_WARNINGS_RESTORE _Pragma("GCC diagnostic pop") > +# define DO_PRAGMA(x) _Pragma(#x) > +# define GCC_WARNINGS_IGNORE(x) DO_PRAGMA(GCC diagnostic ignored x) > +#else > +# define GCC_WARNINGS_SAVE > +# define GCC_WARNINGS_RESTORE > +# define GCC_WARNINGS_IGNORE(x) > +#endif
Do these pragmas work on all versions of gcc that we support? Google suggests that the push/pop ones are only gcc 4.6 or better, for example. -- PMM