Unified · Split
| @@ -0,0 +1,30 @@ | |||
| 1 | #include <stdio.h> | ||
| 2 | |||
| 3 | int main() | ||
| 4 | { | ||
| 5 | /* must not affect how #pragma ppop_macro works */ | ||
| 6 | #define pop_macro foobar1 | ||
| 7 | |||
| 8 | /* must not affect how #pragma push_macro works */ | ||
| 9 | #define push_macro foobar2 | ||
| 10 | |||
| 11 | #undef abort | ||
| 12 | #define abort "111" | ||
| 13 | printf("abort = %s\n", abort); | ||
| 14 | |||
| 15 | #pragma push_macro("abort") | ||
| 16 | #undef abort | ||
| 17 | #define abort "222" | ||
| 18 | printf("abort = %s\n", abort); | ||
| 19 | |||
| 20 | #pragma push_macro("abort") | ||
| 21 | #undef abort | ||
| 22 | #define abort "333" | ||
| 23 | printf("abort = %s\n", abort); | ||
| 24 | |||
| 25 | #pragma pop_macro("abort") | ||
| 26 | printf("abort = %s\n", abort); | ||
| 27 | |||
| 28 | #pragma pop_macro("abort") | ||
| 29 | printf("abort = %s\n", abort); | ||
| 30 | } | ||
| @@ -0,0 +1,5 @@ | |||
| 1 | abort = 111 | ||
| 2 | abort = 222 | ||
| 3 | abort = 333 | ||
| 4 | abort = 222 | ||
| 5 | abort = 111 | ||
| @@ -95,7 +95,8 @@ TESTS = \ · 94 unmodified lines | |||
| 95 | 73_arm64.test \ | 95 | 73_arm64.test \ |
| 96 | 74_nocode_wanted.test \ | 96 | 74_nocode_wanted.test \ |
| 97 | 75_array_in_struct_init.test \ | 97 | 75_array_in_struct_init.test \ |
| 98 | 76_dollars_in_identifiers.test | 98 | 76_dollars_in_identifiers.test \ |
| 99 | 77_push_pop_macro.test | ||
| 99 | 100 | ||
| 100 | # 34_array_assignment.test -- array assignment is not in C standard | 101 | # 34_array_assignment.test -- array assignment is not in C standard |
| 101 | 102 | ||