mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-21 22:14:15 +08:00
new test - traditional token paste
From-SVN: r33732
This commit is contained in:
parent
0616531fb5
commit
d44725ebf5
17
gcc/testsuite/gcc.dg/cpp-tradpaste.c
Normal file
17
gcc/testsuite/gcc.dg/cpp-tradpaste.c
Normal file
@ -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); }
|
Loading…
Reference in New Issue
Block a user