After this last change the radare2 project did not compile anymore. Start with BOL flag after include ends in tccpp.c. Update testcase 18.
Unified · Split
| @@ -2633,7 +2633,8 @@ static inline void next_nomacro1(void) · 2632 unmodified lines | ||
| 2633 | 2633 | s1->include_stack_ptr--; |
| 2634 | 2634 | p = file->buf_ptr; |
| 2635 | 2635 | if (p == file->buffer) |
| 2636 | − tok_flags = TOK_FLAG_BOF|TOK_FLAG_BOL; | |
| 2636 | + tok_flags = TOK_FLAG_BOF; | |
| 2637 | + tok_flags |= TOK_FLAG_BOL; | |
| 2637 | 2638 | goto redo_no_start; |
| 2638 | 2639 | } |
| 2639 | 2640 | } else { |
| @@ -4,6 +4,7 @@ int main() · 3 unmodified lines | ||
| 4 | 4 | { |
| 5 | 5 | printf("including\n"); |
| 6 | 6 | #include "18_include.h" |
| 7 | +#define test_missing_nl | |
| 7 | 8 | printf("done\n"); |
| 8 | 9 | |
| 9 | 10 | #define INC "18_include.h" |
| @@ -1 +1,5 @@ | ||
| 1 | 1 | printf("included\n"); |
| 2 | +/* test file with missing newline */ | |
| 3 | +#ifndef INCLUDE | |
| 4 | +#define INCLUDE | |
| 5 | +#endif /* INCLUDE */ | |