summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/cpp/trad/directive.c
blob: ee7ebcab031ad0d348c8078c0eaf9548cf074c0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* Test for some basic aspects of -traditional directive processing.  */

/* { dg-do preprocess } */

#define HASH #
HASH

/* There is a #error directive.  */

#error bad	/* { dg-error "bad" } */

/* Directives with their #s indented are not recognized.  */
 #if 0	/* { dg-bogus "unterminated" } */

#wrong	/* { dg-error "invalid" } */

#define foo 2
#define bar + 3
#define foobar 6

#if foo/**/bar != 5
# error Comments in directive is a separator /* { dg-bogus "error" } */
#endif