From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/gcc~13/push_002fpop-macro-pragmas.html | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 devdocs/gcc~13/push_002fpop-macro-pragmas.html (limited to 'devdocs/gcc~13/push_002fpop-macro-pragmas.html') diff --git a/devdocs/gcc~13/push_002fpop-macro-pragmas.html b/devdocs/gcc~13/push_002fpop-macro-pragmas.html new file mode 100644 index 00000000..6b48387a --- /dev/null +++ b/devdocs/gcc~13/push_002fpop-macro-pragmas.html @@ -0,0 +1,18 @@ +

6.62.14 Push/Pop Macro Pragmas

For compatibility with Microsoft Windows compilers, GCC supports ‘#pragma push_macro("macro_name")’ and ‘#pragma pop_macro("macro_name")’.

+#pragma push_macro("macro_name") +
+

This pragma saves the value of the macro named as macro_name to the top of the stack for this macro.

+#pragma pop_macro("macro_name") +

This pragma sets the value of the macro named as macro_name to the value on top of the stack for this macro. If the stack for macro_name is empty, the value of the macro remains unchanged.

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-13.1.0/gcc/Push_002fPop-Macro-Pragmas.html +

+
-- cgit v1.2.3