OSDN Git Service

* gcc.dg/cpp/19960224-2.c, 20000625-2.c, cxxcom2.c, directiv.c,
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / cpp / endif.c
1 /* { dg-do preprocess } */
2 /* { dg-options "-pedantic -Wall" } */
3
4 /* You can't get away with this in your own code... */
5 #ifdef KERNEL
6 #define foo
7 #endif KERNEL  /* { dg-warning "extra tokens" "good warning" } */
8
9 /* This will provoke a warning because the '3' is an extension.  */
10 #line 10 "endif-label.c" 3 /* { dg-warning "extra tokens" "#line extension" } */
11
12 /* ... but in a system header, it's acceptable.  */
13 #ifdef KERNEL
14 #define foo
15 #endif KERNEL  /* { dg-bogus "extra tokens" "bad warning" } */