8sa1-gcc/gcc/testsuite/gcc.dg/cpp/paste10.c
Neil Booth ff94c74765 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
2000-09-15 05:55:36 +00:00

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))