diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/cpp/pragma-pop_macro-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/pragma-pop_macro-1.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/cpp/pragma-pop_macro-1.c b/gcc/testsuite/gcc.dg/cpp/pragma-pop_macro-1.c new file mode 100644 index 000000000..c9a904864 --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/pragma-pop_macro-1.c @@ -0,0 +1,12 @@ +/* PR preprocessor/35061 */ +/* Do nothing if there is nothing on the macro stack to pop. */ + +/* { dg-do preprocess } */ + +#define X 1 +/* # pragma push_macro("X") */ +# undef X +# pragma pop_macro("X") +#ifdef X +#error X is defined +#endif |