tccpp: signal missing #endif error
This commit is contained in:
parent
4e5170d4a5
commit
a40814cc9d
1 changed files with 5 additions and 2 deletions
7
tccpp.c
7
tccpp.c
|
@ -2105,8 +2105,11 @@ static inline void next_nomacro1(void)
|
||||||
tok_flags |= TOK_FLAG_EOF;
|
tok_flags |= TOK_FLAG_EOF;
|
||||||
tok = TOK_LINEFEED;
|
tok = TOK_LINEFEED;
|
||||||
goto keep_tok_flags;
|
goto keep_tok_flags;
|
||||||
} else if (s1->include_stack_ptr == s1->include_stack ||
|
} else if (!(parse_flags & PARSE_FLAG_PREPROCESS)) {
|
||||||
!(parse_flags & PARSE_FLAG_PREPROCESS)) {
|
tok = TOK_EOF;
|
||||||
|
} else if (s1->ifdef_stack_ptr != file->ifdef_stack_ptr) {
|
||||||
|
error("missing #endif");
|
||||||
|
} else if (s1->include_stack_ptr == s1->include_stack) {
|
||||||
/* no include left : end of file. */
|
/* no include left : end of file. */
|
||||||
tok = TOK_EOF;
|
tok = TOK_EOF;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue