Mercurial > hg > qcc
changeset 224:2594e03bdc2b
[project @ 2003-04-13 14:03:18 by bellard]
struct syntax fix
author | bellard |
---|---|
date | Sun, 13 Apr 2003 14:03:18 +0000 |
parents | 804086b470ff |
children | 31dbcac044ae |
files | tcc.c |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/tcc.c Thu Apr 10 00:03:26 2003 +0000 +++ b/tcc.c Sun Apr 13 14:03:18 2003 +0000 @@ -1523,7 +1523,7 @@ } /* structure lookup */ -static Sym *struct_find(int v) +static inline Sym *struct_find(int v) { v -= TOK_IDENT; if ((unsigned)v >= (unsigned)(tok_ident - TOK_IDENT)) @@ -5843,7 +5843,8 @@ v = tok; next(); /* struct already defined ? return it */ - /* XXX: check consistency */ + if (v < TOK_IDENT) + expect("struct/union/enum name"); s = struct_find(v); if (s) { if (s->type.t != a)