aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZack Weinberg <zack@gcc.gnu.org>2000-05-06 19:07:34 +0000
committerZack Weinberg <zack@gcc.gnu.org>2000-05-06 19:07:34 +0000
commitd44725ebf5cfe362e195c9f09e7e67dd02208759 (patch)
treea619297055419216eb5346fb2d4cfd6950aaf1fd
parent0616531fb5b99c6139eb0241067d000ab9b44960 (diff)
downloadgcc-d44725ebf5cfe362e195c9f09e7e67dd02208759.zip
gcc-d44725ebf5cfe362e195c9f09e7e67dd02208759.tar.gz
gcc-d44725ebf5cfe362e195c9f09e7e67dd02208759.tar.bz2
new test - traditional token paste
From-SVN: r33732
-rw-r--r--gcc/testsuite/gcc.dg/cpp-tradpaste.c17
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); }