diff options
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp-tradpaste.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/cpp-tradpaste.c b/gcc/testsuite/gcc.dg/cpp-tradpaste.c new file mode 100644 index 0000000..ac8a47b --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp-tradpaste.c @@ -0,0 +1,17 @@ +/* Test for proper comment elimination semantics from cpplib's -traditional. + This should compile and link with compiled with `gcc -traditional-cpp'. + Test case by Jason R. Thorpe <thorpej@zembu.com>. */ + +/* { dg-do compile } */ +/* { dg-options "-traditional" } */ + +#define A(name) X/**/name + +#define B(name) \ +void A(Y/**/name)() { A(name)(); } + +void Xhello() { printf("hello world\n"); } + +B(hello) + +int main() { XYhello(); return (0); } |