Unified · Split
| @@ -1523,7 +1523,7 @@ static Sym *sym_find2(Sym *s, int v) · 1522 unmodified lines | ||
| 1523 | 1523 | } |
| 1524 | 1524 | |
| 1525 | 1525 | /* structure lookup */ |
| 1526 | −static Sym *struct_find(int v) | |
| 1526 | +static inline Sym *struct_find(int v) | |
| 1527 | 1527 | { |
| 1528 | 1528 | v -= TOK_IDENT; |
| 1529 | 1529 | if ((unsigned)v >= (unsigned)(tok_ident - TOK_IDENT)) |
| @@ -5843,7 +5843,8 @@ static void struct_decl(CType *type, int u) · 4313 unmodified lines | ||
| 5843 | 5843 | v = tok; |
| 5844 | 5844 | next(); |
| 5845 | 5845 | /* struct already defined ? return it */ |
| 5846 | − /* XXX: check consistency */ | |
| 5846 | + if (v < TOK_IDENT) | |
| 5847 | + expect("struct/union/enum name"); | |
| 5847 | 5848 | s = struct_find(v); |
| 5848 | 5849 | if (s) { |
| 5849 | 5850 | if (s->type.t != a) |