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. */
11 #foo EMPTY /* { dg-error "invalid" } */
13 /* Test # must be first on line. */
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. */
34 #if func ( /* { dg-error "unterminated argument" } */