Dead
[official-gcc.git] / gomp-20050608-branch / gcc / testsuite / gcc.dg / cpp / directiv.c
blobaafe2ec109d41733653dbeb58b324cbd7b33456a
1 /* Copyright (C) 2000 Free Software Foundation, Inc. */
3 /* { dg-do preprocess } */
4 /* { dg-options -pedantic } */
6 /* Tests general directive syntax, and directive error recovery. */
9 /* Test directive name is not expanded. */
10 #define foo define
11 #foo EMPTY /* { dg-error "invalid" } */
13 /* Test # must be first on line. */
14 EMPTY #define bar
15 #ifdef bar
16 #error bar is defined
17 #endif
19 /* Test form feed and vertical tab warn pedantically, see 6.10
20 paragraph 5. Tab is OK. */
21 #\fdefine something /* { dg-warning "form feed" } */
22 #define \vsomething_else /* { dg-warning "vertical tab" } */
23 \f#define some thing /* Tab OK, as is form feed before #. */
25 /* Our friend the null directive OK? */
28 /* Check newlines end directives, even in function-like macro
29 invocations. 6.10 paragraph 1.
31 Note that the #if is still treated as a conditional, so there
32 should be no errors about #endif without #if. */
33 #define func(x) x
34 #if func ( /* { dg-error "unterminated argument" } */
35 #endif