aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.apple/Wextra-tokens.c
blob: 08b3cb7745c57f4b40570718658031b54491b3ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* APPLE LOCAL file -Wextra-tokens */
/* Lifted from gcc.dg/cpp/extratokens2.c. */
/* Copyright (C) 2002 Free Software Foundation, Inc.  */

/* { dg-do preprocess } */
/* { dg-options "-fno-show-column -Wextra-tokens" } */

/* Tests that -Wextra-tokens correctly enables the checks
   that are disabled by default.  */

#if 1 
#if 0
#else foo	/* { dg-warning "extra tokens" "bad warning" } */
#endif /	/* { dg-warning "extra tokens" "bad warning" } */
#endif

# 36 "file.c" 3

/* ... but in a system header, it's acceptable.  */
#ifdef KERNEL
#endif KERNEL  /* { dg-bogus "extra tokens" "bad warning" } */