History

Fix last __has_include update

After this last change the radare2 project did not compile anymore. Start with BOL flag after include ends in tccpp.c. Update testcase 18.

herman ten brugge committed 4 years ago

Commit 76b88e21 parent 4410dbd3 files · +7 −1Browse files

Unified · Split

3 files
  1. tccpp.c +2 −1
  2. tests/tests2/18_include.c +1 −0
  3. tests/tests2/18_include.h +4 −0
tccpp.c+2−1
@@ -2633,7 +2633,8 @@ static inline void next_nomacro1(void) · 2632 unmodified lines
2633 s1->include_stack_ptr--;2633 s1->include_stack_ptr--;
2634 p = file->buf_ptr;2634 p = file->buf_ptr;
2635 if (p == file->buffer)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 goto redo_no_start;2638 goto redo_no_start;
2638 }2639 }
2639 } else {2640 } else {
tests/tests2/18_include.c+1−0
@@ -4,6 +4,7 @@ int main() · 3 unmodified lines
4{4{
5 printf("including\n");5 printf("including\n");
6#include "18_include.h"6#include "18_include.h"
7#define test_missing_nl
7 printf("done\n");8 printf("done\n");
8 9
9#define INC "18_include.h"10#define INC "18_include.h"
tests/tests2/18_include.h+4−0
@@ -1 +1,5 @@
1printf("included\n");1printf("included\n");
2/* test file with missing newline */
3#ifndef INCLUDE
4#define INCLUDE
5#endif /* INCLUDE */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t