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