diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.dg/cpp/paste8-2.c')
-rw-r--r-- | gcc-4.9/gcc/testsuite/gcc.dg/cpp/paste8-2.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/cpp/paste8-2.c b/gcc-4.9/gcc/testsuite/gcc.dg/cpp/paste8-2.c new file mode 100644 index 000000000..c037e99e6 --- /dev/null +++ b/gcc-4.9/gcc/testsuite/gcc.dg/cpp/paste8-2.c @@ -0,0 +1,15 @@ +/* { dg-do preprocess } */ +/* { dg-options "-ftrack-macro-expansion=2" } */ + +int foo(int, ...); + +#define a(x, y...) foo(x, ##y) +a(1) +a(1, 2, 3) +#define b(x, y, z...) foo(x, ##y) /* { dg-error "valid preprocessing token" } */ +b(1, 2, 3) +#define c(x, y, z...) foo(x, ##z) +c(1, 2) +c(1, 2, 3) +#define d(x) fo(##x) /* { dg-error "valid preprocessing token" } */ +d(1) |