aboutsummaryrefslogtreecommitdiff
path: root/tests/tests2/77_push_pop_macro.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tests2/77_push_pop_macro.c')
-rw-r--r--tests/tests2/77_push_pop_macro.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/tests2/77_push_pop_macro.c b/tests/tests2/77_push_pop_macro.c
new file mode 100644
index 0000000..1f0b1bc
--- /dev/null
+++ b/tests/tests2/77_push_pop_macro.c
@@ -0,0 +1,23 @@
+#include <stdio.h>
+
+int main()
+{
+ #define abort "111"
+ printf("abort = %s\n", abort);
+
+ #pragma push_macro("abort")
+ #undef abort
+ #define abort "222"
+ printf("abort = %s\n", abort);
+
+ #pragma push_macro("abort")
+ #undef abort
+ #define abort "333"
+ printf("abort = %s\n", abort);
+
+ #pragma pop_macro("abort")
+ printf("abort = %s\n", abort);
+
+ #pragma pop_macro("abort")
+ printf("abort = %s\n", abort);
+}