1 /* Copyright (C) 2002, 2003 Free Software Foundation, Inc.  */
2 
3 /* { dg-do preprocess } */
4 /* Duplicate command line options should not warn.  */
5 /* { dg-options "-Wunused-macros -Dfoo -Dfoo" } */
6 
7 /* Test everything related to -Wunused-macros.
8 
9    Source: Neil Booth, 23 Jul 2002.  */
10 
11 #include "Wunused.h"
12 
13 #define used1			/* { dg-bogus "used" } */
14 #define used2			/* { dg-bogus "used" } */
15 #define used3			/* { dg-bogus "used" } */
16 #define used4 used4		/* { dg-bogus "used" } */
17 
18 #define unused5			/* { dg-warning "used" } */
19 #define unused6			/* { dg-warning "used" } */
20 #define unused7()		/* { dg-warning "used" } */
21 
22 #if defined used1
23 #endif
24 #ifdef used2
25 #endif
26 #ifndef used3
27 #endif
28 used4
29 
30 unused7				/* This does not count as a use.  */
31 
32 #if 0
33 unused5				/* This does not count as a use.  */
34 #endif
35 #undef unused5
36 
37 #define unused6
38 unused6
39