20 lines
705 B
C
20 lines
705 B
C
#pragma once
|
|
|
|
#ifdef __GNUC__
|
|
#define GCC_DIAG_STR(s) #s
|
|
#define GCC_DIAG_JOINSTR(x, y) GCC_DIAG_STR(x##y)
|
|
#define GCC_DIAG_DO_PRAGMA(x) _Pragma(#x)
|
|
#define GCC_DIAG_PRAGMA(x) GCC_DIAG_DO_PRAGMA(GCC diagnostic x)
|
|
#define GCC_DIAG_OFF(x) \
|
|
GCC_DIAG_PRAGMA(push) \
|
|
GCC_DIAG_PRAGMA(ignored x)
|
|
#define GCC_DIAG_RESTORE() GCC_DIAG_PRAGMA(pop)
|
|
#define WIN32_DIAG_OFF(x)
|
|
#define WIN32_DIAG_RESTORE()
|
|
#else
|
|
#define GCC_DIAG_OFF(x)
|
|
#define GCC_DIAG_RESTORE()
|
|
#define WIN32_DIAG_OFF(x) __pragma(warning(push)) __pragma(warning(disable : x))
|
|
#define WIN32_DIAG_RESTORE() __pragma(warning(pop))
|
|
#endif
|