2018-01-24 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / cpp / tr-paste.c
blob1dd82766317946f76028ae4b1008d8bbf8f4fa82
1 /* Test for proper comment elimination semantics from cpplib's -traditional.
2 This should compile and link with compiled with `gcc -traditional-cpp'.
3 Test case by Jason R. Thorpe <thorpej@zembu.com>. */
5 /* { dg-do compile } */
6 /* { dg-options "-traditional-cpp" } */
8 extern int printf (const char *, ...);
10 #define A(name) X/**/name
12 #define B(name) \
13 void A(Y/**/name)() { A(name)(); }
15 void Xhello() { printf("hello world\n"); }
17 B(hello)
19 int main() { XYhello(); return (0); }