Go to the documentation of this file.
32 #ifndef TCE_COMPILER_WARNINGS_HH
33 #define TCE_COMPILER_WARNINGS_HH
35 #define DO_PRAGMA(x) _Pragma(#x)
39 #define IGNORE_COMPILER_WARNING(X) \
40 DO_PRAGMA(clang diagnostic push) \
41 DO_PRAGMA(clang diagnostic ignored X)
43 #elif defined(__GNUC__)
45 #define IGNORE_COMPILER_WARNING(X) \
46 DO_PRAGMA(GCC diagnostic push) \
47 DO_PRAGMA(GCC diagnostic ignored X)
51 #define IGNORE_COMPILER_WARNING(X)
58 #define POP_COMPILER_DIAGS \
59 DO_PRAGMA(clang diagnostic pop)
61 #elif defined(__GNUC__)
63 #define POP_COMPILER_DIAGS \
64 DO_PRAGMA(GCC diagnostic pop)
68 #define POP_COMPILER_DIAGS
79 #define IGNORE_CLANG_WARNING(X) \
80 DO_PRAGMA(clang diagnostic push) \
81 DO_PRAGMA(clang diagnostic ignored X)
85 #define IGNORE_CLANG_WARNING(X)
91 #define POP_CLANG_DIAGS \
92 DO_PRAGMA(clang diagnostic pop)
96 #define POP_CLANG_DIAGS