#pragma GCC diagnostic push #pragma GCC diagnostic warning "-Wspecific-warning" #pragma GCC diagnostic ignored "-Wspecific-warning" ... #pragma GCC diagnostic pop
#define MM_WARNING_IGNORE_GCC(x) MM_IF_GCC( _Pragma(GCC diagnostic ignored x) ) #define MM_WARNING_IGNORE_CLANG(x) MM_IF_CLANG( _Pragma(clang diagnostic ignored x) ) #define MM_WARNING_IGNORE_MSVC(x) MM_IF_MSVC( __pragma(warning(disable: x)) ) #define MM_WARNING_PUSH() \ IF_GCC( _Pragma(GCC diagnostic push) ) \ IF_CLANG( _Pragma(clang diagnostic push) ) \ IF_MSVC( __pragma(warning(push)) ) #define MM_WARNING_POP() \ IF_GCC( _Pragma(GCC diagnostic pop) ) \ IF_CLANG( _Pragma(clang diagnostic pop) ) \ IF_MSVC( __pragma(warning(pop)) ) MM_WARNING_PUSH() MM_WARNING_IGNORE_GCC("-Wspecific-warning") MM_WARNING_IGNORE_CLANG("-Wspecific-warning") MM_WARNING_IGNORE_MSVC(1234) ... MM_WARNING_POP()