History

added K&R proto parsing

bellard committed 24 years ago

Commit f22a3231 parent df9c0471 file · +9 −1Browse files

Unified · Split

tcc.c+9−1
@@ -3289,7 +3289,15 @@ void decl(l) · 3288 unmodified lines
3289 int *a, t, b, v, u, n, addr, has_init;3289 int *a, t, b, v, u, n, addr, has_init;
3290 Sym *sym;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 if ((b & (VT_ENUM | VT_STRUCT)) && tok == ';') {3301 if ((b & (VT_ENUM | VT_STRUCT)) && tok == ';') {
3294 /* we accept no variable after */3302 /* we accept no variable after */
3295 next();3303 next();

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t