History

tccgen: Fix optional semicolon regression

Zuhaitz-dev committed 7 months ago

Commit 169628a1 parent 8ecfd0a1 file · +4 −5Browse files

Unified · Split

tccgen.c+4−5
@@ -8718,10 +8718,6 @@ static int decl(int l) · 8717 unmodified lines
8718 return 1;8718 return 1;
8719 next();8719 next();
8720 continue;8720 continue;
8721 } else if (l != VT_JMP && l != VT_CMP) {
8722 /* no semicolon - let caller handle it */
8723 } else {
8724 expect(";");
8725 }8721 }
8726 8722
8727 while (1) { /* iterate thru each declaration */8723 while (1) { /* iterate thru each declaration */
@@ -8908,7 +8904,10 @@ static int decl(int l) · 180 unmodified lines
8908 if (tok != ',') {8904 if (tok != ',') {
8909 if (l == VT_JMP)8905 if (l == VT_JMP)
8910 return has_init ? v : 1;8906 return has_init ? v : 1;
8911 if (tok == ';') next();8907 if (l == VT_CMP)
8908 skip(';');
8909 else if (tok == ';')
8910 next();
8912 break;8911 break;
8913 }8912 }
8914 next();8913 next();

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