From: Zack Weinberg Date: Sat, 6 May 2000 19:07:34 +0000 (+0000) Subject: new test - traditional token paste X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d44725ebf5cfe362e195c9f09e7e67dd02208759;p=gcc.git new test - traditional token paste From-SVN: r33732 --- diff --git a/gcc/testsuite/gcc.dg/cpp-tradpaste.c b/gcc/testsuite/gcc.dg/cpp-tradpaste.c new file mode 100644 index 00000000000..ac8a47bcbf5 --- /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 . */ + +/* { 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); }