From ff94c747653bba7f146f1f8304286d82f17d8ae9 Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Fri, 15 Sep 2000 05:55:36 +0000 Subject: 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 --- gcc/testsuite/gcc.dg/cpp/paste10.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/cpp/paste10.c (limited to 'gcc/testsuite/gcc.dg/cpp/paste10.c') 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)) -- cgit v1.1