I'm trying to do something like this:
#ifdef _MSC_VER
    #define DISABLE_WARNINGS() \
        #pragma warning( push, 0 )
#elif __GNUC__
#define DISABLE_WARNINGS() \
        #define DISABLE_WARNINGS \
        #pragma GCC diagnostic push \
        #pragma GCC diagnostic ignored "-Wall"
#endif
I would like to define a single macro such as "DISABLE_WARNINGS" in my code before including 3rd party headers that produce enormous amount of warnings on W4, and also ensure the code compiles on any platform.
For example:
DISABLE_WARNINGS
#include <gtkmm/buttonbox.h>
#include <gtkmm/box.h>
#include <gtkmm/window.h>
#include <gtkmm/button.h>
ENABLE_WARNINGS
What would be the best way to achieve this with single macro?
 
     
    