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
87188718 return 1;
87198719 next();
87208720 continue;
8721− } else if (l != VT_JMP && l != VT_CMP) {
8722− /* no semicolon - let caller handle it */
8723− } else {
8724− expect(";");
87258721 }
87268722
87278723 while (1) { /* iterate thru each declaration */
@@ -8908,7 +8904,10 @@ static int decl(int l) · 180 unmodified lines
89088904 if (tok != ',') {
89098905 if (l == VT_JMP)
89108906 return has_init ? v : 1;
8911− if (tok == ';') next();
8907+ if (l == VT_CMP)
8908+ skip(';');
8909+ else if (tok == ';')
8910+ next();
89128911 break;
89138912 }
89148913 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