2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / gcc.dg / cpp / trad / directive.c
blobee7ebcab031ad0d348c8078c0eaf9548cf074c0c
1 /* Test for some basic aspects of -traditional directive processing. */
3 /* { dg-do preprocess } */
5 #define HASH #
6 HASH
8 /* There is a #error directive. */
10 #error bad /* { dg-error "bad" } */
12 /* Directives with their #s indented are not recognized. */
13 #if 0 /* { dg-bogus "unterminated" } */
15 #wrong /* { dg-error "invalid" } */
17 #define foo 2
18 #define bar + 3
19 #define foobar 6
21 #if foo/**/bar != 5
22 # error Comments in directive is a separator /* { dg-bogus "error" } */
23 #endif