diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/cpp/trad/funlike-4.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/trad/funlike-4.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/funlike-4.c b/gcc/testsuite/gcc.dg/cpp/trad/funlike-4.c new file mode 100644 index 000000000..fcc65a8d6 --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/trad/funlike-4.c @@ -0,0 +1,26 @@ +/* Test that undefined names evaluate to zero, that macros after a + funlike macro are expanded, and that if it is a '(' the funlike + macro is not treated as such. */ + +/* { dg-do run } */ + +extern void abort (void); + +#define f(x) x + +int main () +{ +#if f(1) == f /**/ (/**/1/**/) + int x; +#endif + + x = 0; + if (f + /**/ ( + /**/ 0/**/ + /**/) + ) + abort (); + + return 0; +} |