For compatibility with Microsoft Windows compilers, GCC supports ‘#pragma push_macro("macro_name")’ and ‘#pragma pop_macro("macro_name")’.
#pragma push_macro(
"macro_name")
#pragma pop_macro(
"macro_name")
For example:
#define X 1 #pragma push_macro("X") #undef X #define X -1 #pragma pop_macro("X") int x [X];
In this example, the definition of X as 1 is saved by #pragma
push_macro
and restored by #pragma pop_macro
.
© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-4.9.3/gcc/Push_002fPop-Macro-Pragmas.html