Document gcov-io (PR gcov-profile/84735).
[official-gcc.git] / gcc / testsuite / gcc.dg / cpp / extratokens.c
blob11d094af572d506f29c2496572acd4d6356653b1
1 /* Copyright (C) 2000, 2008 Free Software Foundation, Inc. */
3 /* { dg-do preprocess } */
4 /* { dg-options "-Wno-deprecated" } */
6 /* Tests all directives that do not permit excess tokens at the end of
7 the line. */
9 /* Source: Neil Booth, 4 Dec 2000. The combination of separate test
10 cases. */
12 #ifdef foo bar /* { dg-warning "extra tokens" "tokens after #ifdef" } */
13 #endif
15 #ifndef foo bar /* { dg-warning "extra tokens" "tokens after #ifndef" } */
16 #endif
18 #if 1
19 #if 0
20 #else foo /* { dg-warning "extra tokens" "tokens after #else" } */
21 #endif / /* { dg-warning "extra tokens" "tokens after #endif" } */
22 #endif
24 #undef foo bar /* { dg-warning "extra tokens" "tokens after #undef" } */
26 #assert foo(bar) bar /* { dg-warning "extra tokens" "tokens after #assert" } */
28 #unassert foo(bar) b /* { dg-warning "extra tokens" "tokens after #unassert" } */
30 #include "mi1c.h" bar /* { dg-warning "extra tokens" "tokens after #include" } */
32 #ident "something" bar /* { dg-warning "extra tokens" "tokens after #ident" } */
34 # 36 "file.c" 3
36 /* ... but in a system header, it's acceptable. */
37 #ifdef KERNEL
38 #endif KERNEL /* { dg-bogus "extra tokens" "bad warning" } */