aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/cpp
diff options
context:
space:
mode:
authorNeil Booth <neilb@earthling.net>2000-09-15 05:55:36 +0000
committerNeil Booth <neil@gcc.gnu.org>2000-09-15 05:55:36 +0000
commitff94c747653bba7f146f1f8304286d82f17d8ae9 (patch)
tree46b2b60f181bbf21ca0786fa960ec2f8d89df671 /gcc/testsuite/gcc.dg/cpp
parentb437f1a754649a06bd783fc707b5bff14c9c5eed (diff)
downloadgcc-ff94c747653bba7f146f1f8304286d82f17d8ae9.zip
gcc-ff94c747653bba7f146f1f8304286d82f17d8ae9.tar.gz
gcc-ff94c747653bba7f146f1f8304286d82f17d8ae9.tar.bz2
cpplex.c (ON_REST_ARG): Correct the test.
* cpplex.c (ON_REST_ARG): Correct the test. (maybe_paste_with_next): Duplicate a token that fail pasting, and clear its PASTE_LEFT flag, so that nested pasting attempts do not occur. * gcc.dg/cpp/paste10.c: Testcase. From-SVN: r36424
Diffstat (limited to 'gcc/testsuite/gcc.dg/cpp')
-rw-r--r--gcc/testsuite/gcc.dg/cpp/paste10.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/cpp/paste10.c b/gcc/testsuite/gcc.dg/cpp/paste10.c
new file mode 100644
index 0000000..ab3cb90
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/paste10.c
@@ -0,0 +1,15 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc. */
+
+/* { dg-do preprocess } */
+/* { dg-options "" } */
+
+/* This testcase used to produce a bogus "invalid paste" warning, owing
+ to not clearing a PASTE_LEFT flag. */
+
+#define strcpy(src) __strcpy_small (src)
+
+#define __strcpy_small(src) src
+
+#define tprintf(format, args...) sprintf(format, ## args)
+
+strcpy(tprintf("<%s>", test))