Skip to content

Commit 169628a

Browse files
committed
tccgen: Fix optional semicolon regression
1 parent 8ecfd0a commit 169628a

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

tccgen.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8718,10 +8718,6 @@ static int decl(int l)
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)
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();

0 commit comments

Comments
 (0)