annotate gcc/testsuite/gcc.dg/cpp/defined-Wno-expansion-to-defined.c @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +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) 2000 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 -pedantic-errors -Wno-expansion-to-defined" } */
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 /* Use of defined in different contexts. */
kono
parents:
diff changeset
7
kono
parents:
diff changeset
8 /* Source: Neil Booth, 29 Oct 2000, Zack Weinberg 11 Dec 2000. */
kono
parents:
diff changeset
9
kono
parents:
diff changeset
10 #define Z
kono
parents:
diff changeset
11
kono
parents:
diff changeset
12 #define bad0 defined Z
kono
parents:
diff changeset
13 #if !bad0 /* { dg-bogus "may not be portable" } */
kono
parents:
diff changeset
14 #error Z is defined
kono
parents:
diff changeset
15 #endif
kono
parents:
diff changeset
16
kono
parents:
diff changeset
17 #define bad1 defined
kono
parents:
diff changeset
18 #if !bad1 Z /* { dg-bogus "may not be portable" } */
kono
parents:
diff changeset
19 #error Z is defined
kono
parents:
diff changeset
20 #endif
kono
parents:
diff changeset
21
kono
parents:
diff changeset
22 #if !bad1 (Z) /* { dg-bogus "may not be portable" } */
kono
parents:
diff changeset
23 #error Z is defined
kono
parents:
diff changeset
24 #endif
kono
parents:
diff changeset
25
kono
parents:
diff changeset
26 #define bad2 defined (Z
kono
parents:
diff changeset
27 #if !bad2) /* { dg-bogus "may not be portable" } */
kono
parents:
diff changeset
28 #error Z is defined
kono
parents:
diff changeset
29 #endif
kono
parents:
diff changeset
30