tccgen: Fix optional semicolon regression

This commit is contained in:
Zuhaitz-dev 2026-04-16 17:24:21 +01:00
parent 8ecfd0a722
commit 169628a6ab

View File

@ -8718,10 +8718,6 @@ static int decl(int l)
return 1;
next();
continue;
} else if (l != VT_JMP && l != VT_CMP) {
/* no semicolon - let caller handle it */
} else {
expect(";");
}
while (1) { /* iterate thru each declaration */
@ -8908,7 +8904,10 @@ static int decl(int l)
if (tok != ',') {
if (l == VT_JMP)
return has_init ? v : 1;
if (tok == ';') next();
if (l == VT_CMP)
skip(';');
else if (tok == ';')
next();
break;
}
next();