mirror of
https://github.com/frida/tinycc
synced 2024-11-24 16:49:44 +03:00
added K&R proto parsing
This commit is contained in:
parent
df9c047082
commit
f22a32342b
10
tcc.c
10
tcc.c
@ -3289,7 +3289,15 @@ void decl(l)
|
||||
int *a, t, b, v, u, n, addr, has_init;
|
||||
Sym *sym;
|
||||
|
||||
while (b = ist()) {
|
||||
while (1) {
|
||||
b = ist();
|
||||
if (!b) {
|
||||
/* special test for old K&R protos without explicit int
|
||||
type. Only accepted when defining global data */
|
||||
if (l == VT_LOCAL || tok < TOK_DEFINE)
|
||||
break;
|
||||
b = VT_INT;
|
||||
}
|
||||
if ((b & (VT_ENUM | VT_STRUCT)) && tok == ';') {
|
||||
/* we accept no variable after */
|
||||
next();
|
||||
|
Loading…
Reference in New Issue
Block a user