annotate gcc/testsuite/gcc.dg/cpp/avoidpaste1.c @ 132:d34655255c78

update gcc-8.2
author mir3636
date Thu, 25 Oct 2018 10:21:07 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Copyright (C) 2001, 2003 Free Software Foundation, Inc. */
kono
parents:
diff changeset
2
kono
parents:
diff changeset
3 /* { dg-do preprocess } */
kono
parents:
diff changeset
4 /* { dg-options "-ansi" } */
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 /* This tests that we avoid accidental pasting only before and after
kono
parents:
diff changeset
7 macros and arguments, and not when the tokens are already pasted
kono
parents:
diff changeset
8 in the souce file (e.g. "::" in a C source file).
kono
parents:
diff changeset
9
kono
parents:
diff changeset
10 Neil Booth, 28 Jan 2001. */
kono
parents:
diff changeset
11
kono
parents:
diff changeset
12 #define f(x) x
kono
parents:
diff changeset
13 #define g
kono
parents:
diff changeset
14 #define tricky 1.0e ## -1
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 /* This should preprocess as
kono
parents:
diff changeset
17
kono
parents:
diff changeset
18 :: : : : : :^: 1.0e- 1
kono
parents:
diff changeset
19 : : : .. . 0 0 .
kono
parents:
diff changeset
20
kono
parents:
diff changeset
21 It relies on the fact that even when preprocessing C we bother to separate
kono
parents:
diff changeset
22 the colons of C++'s :: operator. If we confine this behavior to C++
kono
parents:
diff changeset
23 in future, this test needs to change. */
kono
parents:
diff changeset
24
kono
parents:
diff changeset
25 :: :g: :f(): :f(^): tricky
kono
parents:
diff changeset
26 :f(:): .. .__INCLUDE_LEVEL__ __INCLUDE_LEVEL__. /* Check builtins, too. */
kono
parents:
diff changeset
27
kono
parents:
diff changeset
28 /* { dg-final { scan-file avoidpaste1.i ":: : : : : :\\^: 1.0e- 1" } }
kono
parents:
diff changeset
29 { dg-final { scan-file avoidpaste1.i ": : : \\\.\\\. \\\. 0 0 \\\." } } */