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
26332633 s1->include_stack_ptr--;
26342634 p = file->buf_ptr;
26352635 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;
26372638 goto redo_no_start;
26382639 }
26392640 } else {
tests/tests2/18_include.c+1−0
@@ -4,6 +4,7 @@ int main() · 3 unmodified lines
44 {
55 printf("including\n");
66 #include "18_include.h"
7+#define test_missing_nl
78 printf("done\n");
89
910 #define INC "18_include.h"
tests/tests2/18_include.h+4−0
@@ -1 +1,5 @@
11 printf("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