diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/cpp/vararg4.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/vararg4.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/cpp/vararg4.c b/gcc/testsuite/gcc.dg/cpp/vararg4.c new file mode 100644 index 000000000..460cebf28 --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/vararg4.c @@ -0,0 +1,14 @@ +/* Copyright (C) 2002 Free Software Foundation, Inc. */ + +/* { dg-do preprocess } */ +/* { dg-options -std=gnu99 } */ + +/* Source: Neil Booth, 6 Aug 2002. + + Tests that we DTRT with varargs commas. */ + +#define g(a, ...) a , ## __VA_ARGS__ + +/* The comma from g's expansion should be retained. */ +#if g (2, ) 3 /* { dg-bogus "missing binary operator" } */ +#endif |