1 /* Copyright (C) 2000 Free Software Foundation, Inc.  */
2 
3 /* { dg-do preprocess } */
4 /* { dg-options "-ansi -pedantic-errors -Wno-expansion-to-defined" } */
5 
6 /* Use of defined in different contexts.  */
7 
8 /*  Source: Neil Booth, 29 Oct 2000, Zack Weinberg 11 Dec 2000.  */
9 
10 #define Z
11 
12 #define bad0 defined Z
13 #if !bad0                       /* { dg-bogus "may not be portable" } */
14 #error Z is defined
15 #endif
16 
17 #define bad1 defined
18 #if !bad1 Z			/* { dg-bogus "may not be portable" } */
19 #error Z is defined
20 #endif
21 
22 #if !bad1 (Z)			/* { dg-bogus "may not be portable" } */
23 #error Z is defined
24 #endif
25 
26 #define bad2 defined (Z
27 #if !bad2)			/* { dg-bogus "may not be portable" } */
28 #error Z is defined
29 #endif
30 
31