mirror of
git://repo.or.cz/tinycc.git
synced 2026-11-05 05:36:35 +08:00
tccgen: Fix optional semicolon regression
This commit is contained in:
parent
8ecfd0a722
commit
169628a6ab
9
tccgen.c
9
tccgen.c
@ -8718,10 +8718,6 @@ static int decl(int l)
|
|||||||
return 1;
|
return 1;
|
||||||
next();
|
next();
|
||||||
continue;
|
continue;
|
||||||
} else if (l != VT_JMP && l != VT_CMP) {
|
|
||||||
/* no semicolon - let caller handle it */
|
|
||||||
} else {
|
|
||||||
expect(";");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
while (1) { /* iterate thru each declaration */
|
while (1) { /* iterate thru each declaration */
|
||||||
@ -8908,7 +8904,10 @@ static int decl(int l)
|
|||||||
if (tok != ',') {
|
if (tok != ',') {
|
||||||
if (l == VT_JMP)
|
if (l == VT_JMP)
|
||||||
return has_init ? v : 1;
|
return has_init ? v : 1;
|
||||||
if (tok == ';') next();
|
if (l == VT_CMP)
|
||||||
|
skip(';');
|
||||||
|
else if (tok == ';')
|
||||||
|
next();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
next();
|
next();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user