gcc/testsuite/gcc.dg/cpp/trad/funlike-3.c
raw| 1 | /* Test that function-like macros are restricted to directives, and |
| 2 | that unterminated ones are warned about. */ |
| 3 | |
| 4 | /* { dg-do preprocess } */ |
| 5 | |
| 6 | #define f(x) x |
| 7 | |
| 8 | #if 2 f(/* { dg-error "-:unterminated" "unterminated macro in directive" } */ |
| 9 | ) |
| 10 | #endif |
| 11 | |
| 12 | f( /* { dg-error "-:unterminated" "unterminated macro" } */ |