No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gcc4 / gcc / testsuite / gcc.dg / cpp / avoidpaste1.c
blobd304a74415589cd8b39fa9889289cc3b374d9f8c
1 /* Copyright (C) 2001, 2003 Free Software Foundation, Inc. */
3 /* { dg-do preprocess } */
5 /* This tests that we avoid accidental pasting only before and after
6 macros and arguments, and not when the tokens are already pasted
7 in the souce file (e.g. "::" in a C source file).
9 Neil Booth, 28 Jan 2001. */
11 #define f(x) x
12 #define g
13 #define tricky 1.0e ## -1
15 /* This should preprocess as
17 :: : : : : :^: 1.0e- 1
18 : : : .. . 0 0 .
20 It relies on the fact that even when preprocessing C we bother to separate
21 the colons of C++'s :: operator. If we confine this behavior to C++
22 in future, this test needs to change. */
24 :: :g: :f(): :f(^): tricky
25 :f(:): .. .__INCLUDE_LEVEL__ __INCLUDE_LEVEL__. /* Check builtins, too. */
27 /* { dg-final { scan-file avoidpaste1.i ":: : : : : :\\^: 1.0e- 1" } }
28 { dg-final { scan-file avoidpaste1.i ": : : \\\.\\\. \\\. 0 0 \\\." } } */