Debian Codegraph @

gcc/testsuite/gcc.dg/cpp/line7.c

raw
1 /* Test #line syntax, including macro expansion and empty macros. PR
2 39647. */
3
4 /* { dg-do preprocess } */
5 /* { dg-options "-std=c99 -pedantic-errors" } */
6
7 #define EMPTY_OBJ
8 #define EMPTY_FUNC()
9
10 #define A 12 "line7.c"
11 #line A
12
13 #line EMPTY_OBJ /* { dg-error "unexpected end of file" } */
14 #line X /* { dg-error "is not a positive integer" } */
15 #line 16 16 /* { dg-error "is not a valid filename" } */
16
17 #line 18 "line7.c" EMPTY_OBJ
18 #line 19 "line7.c" EMPTY_FUNC()
19 #line 20 "line7.c" foo /* { dg-error "extra tokens at end" } */