Unified · Split
| @@ -3289,7 +3289,15 @@ void decl(l) · 3288 unmodified lines | ||
| 3289 | 3289 | int *a, t, b, v, u, n, addr, has_init; |
| 3290 | 3290 | Sym *sym; |
| 3291 | 3291 | |
| 3292 | − while (b = ist()) { | |
| 3292 | + while (1) { | |
| 3293 | + b = ist(); | |
| 3294 | + if (!b) { | |
| 3295 | + /* special test for old K&R protos without explicit int | |
| 3296 | + type. Only accepted when defining global data */ | |
| 3297 | + if (l == VT_LOCAL || tok < TOK_DEFINE) | |
| 3298 | + break; | |
| 3299 | + b = VT_INT; | |
| 3300 | + } | |
| 3293 | 3301 | if ((b & (VT_ENUM | VT_STRUCT)) && tok == ';') { |
| 3294 | 3302 | /* we accept no variable after */ |
| 3295 | 3303 | next(); |