aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/cpp/skipping2.c
blob: 21378003fe2513d59faac466248e1b43b3d181e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* Copyright (C) 2001 Free Software Foundation, Inc.  */

/* { dg-do preprocess } */

/* Tests that excess tokens in skipped conditional blocks don't warn.  */

/* Source: Neil Booth, 25 Jul 2001.  */

/* APPLE LOCAL -Wextra-tokens required in Apple's compiler to elicit req'd warnings here */
/* { dg-options "-Wextra-tokens" } */

#if 0
#if foo
#else foo   /* { dg-bogus "extra tokens" "extra tokens in skipped block" } */
#endif foo  /* { dg-bogus "extra tokens" "extra tokens in skipped block" } */
#endif bar  /* { dg-warning "extra tokens" "tokens after #endif" } */