* 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
16 lines
389 B
C
16 lines
389 B
C
/* 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))
|