History

tccpp: fix quirk with cached headers and #else

Such as with #ifndef FOO_H ... #else ... #endif

grischka committed 17 years ago

Commit 569c20f1 parent 1026ca51 file · +4 −1Browse files

Unified · Split

tccpp.c+4−1
@@ -1392,7 +1392,7 @@ include_done: · 1391 unmodified lines
1392 if (s1->ifdef_stack_ptr[-1] & 2)1392 if (s1->ifdef_stack_ptr[-1] & 2)
1393 error("#else after #else");1393 error("#else after #else");
1394 c = (s1->ifdef_stack_ptr[-1] ^= 3);1394 c = (s1->ifdef_stack_ptr[-1] ^= 3);
1395 goto test_skip;1395 goto test_else;
1396 case TOK_ELIF:1396 case TOK_ELIF:
1397 if (s1->ifdef_stack_ptr == s1->ifdef_stack)1397 if (s1->ifdef_stack_ptr == s1->ifdef_stack)
1398 error("#elif without matching #if");1398 error("#elif without matching #if");
@@ -1404,6 +1404,9 @@ include_done: · 5 unmodified lines
1404 goto skip;1404 goto skip;
1405 c = expr_preprocess();1405 c = expr_preprocess();
1406 s1->ifdef_stack_ptr[-1] = c;1406 s1->ifdef_stack_ptr[-1] = c;
1407 test_else:
1408 if (s1->ifdef_stack_ptr == file->ifdef_stack_ptr + 1)
1409 file->ifndef_macro = 0;
1407 test_skip:1410 test_skip:
1408 if (!(c & 1)) {1411 if (!(c & 1)) {
1409 skip:1412 skip:

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