1 #ifndef RBIMPL_WARNING_PUSH_H
2 #define RBIMPL_WARNING_PUSH_H
48 #if defined(__DOXYGEN__)
55 #define RBIMPL_WARNING_PUSH() __pragma(warning(push))
62 #define RBIMPL_WARNING_POP() __pragma(warning(pop))
71 #define RBIMPL_WARNING_ERROR(flag) __pragma(warning(error: flag))
80 #define RBIMPL_WARNING_IGNORED(flag) __pragma(warning(disable: flag))
82 #elif RBIMPL_COMPILER_SINCE(MSVC, 12, 0, 0)
84 # define RBIMPL_WARNING_PUSH() __pragma(warning(push))
85 # define RBIMPL_WARNING_POP() __pragma(warning(pop))
86 # define RBIMPL_WARNING_ERROR(flag) __pragma(warning(error: flag))
87 # define RBIMPL_WARNING_IGNORED(flag) __pragma(warning(disable: flag))
89 #elif RBIMPL_COMPILER_SINCE(Intel, 13, 0, 0)
90 # define RBIMPL_WARNING_PUSH() __pragma(warning(push))
91 # define RBIMPL_WARNING_POP() __pragma(warning(pop))
92 # define RBIMPL_WARNING_ERROR(flag) __pragma(warning(error: flag))
93 # define RBIMPL_WARNING_IGNORED(flag) __pragma(warning(disable: flag))
95 #elif RBIMPL_COMPILER_IS(Clang) || RBIMPL_COMPILER_IS(Apple)
97 # define RBIMPL_WARNING_PRAGMA0(x) _Pragma(# x)
98 # define RBIMPL_WARNING_PRAGMA1(x) RBIMPL_WARNING_PRAGMA0(clang diagnostic x)
99 # define RBIMPL_WARNING_PRAGMA2(x, y) RBIMPL_WARNING_PRAGMA1(x # y)
100 # define RBIMPL_WARNING_PUSH() RBIMPL_WARNING_PRAGMA1(push)
101 # define RBIMPL_WARNING_POP() RBIMPL_WARNING_PRAGMA1(pop)
102 # define RBIMPL_WARNING_ERROR(flag) RBIMPL_WARNING_PRAGMA2(error, flag)
103 # define RBIMPL_WARNING_IGNORED(flag) RBIMPL_WARNING_PRAGMA2(ignored, flag)
105 #elif RBIMPL_COMPILER_SINCE(GCC, 4, 6, 0)
107 # define RBIMPL_WARNING_PRAGMA0(x) _Pragma(# x)
108 # define RBIMPL_WARNING_PRAGMA1(x) RBIMPL_WARNING_PRAGMA0(GCC diagnostic x)
109 # define RBIMPL_WARNING_PRAGMA2(x, y) RBIMPL_WARNING_PRAGMA1(x # y)
110 # define RBIMPL_WARNING_PUSH() RBIMPL_WARNING_PRAGMA1(push)
111 # define RBIMPL_WARNING_POP() RBIMPL_WARNING_PRAGMA1(pop)
112 # define RBIMPL_WARNING_ERROR(flag) RBIMPL_WARNING_PRAGMA2(error, flag)
113 # define RBIMPL_WARNING_IGNORED(flag) RBIMPL_WARNING_PRAGMA2(ignored, flag)
117 # define RBIMPL_WARNING_PUSH()
118 # define RBIMPL_WARNING_POP()
119 # define RBIMPL_WARNING_ERROR(flag)
120 # define RBIMPL_WARNING_IGNORED(flag)
Defines RBIMPL_COMPILER_IS.
Defines RBIMPL_COMPILER_SINCE.