mirror of
https://github.com/frida/tinycc
synced 2025-01-01 17:44:26 +03:00
struct syntax fix
This commit is contained in:
parent
3605c50b36
commit
eed54d6bfb
5
tcc.c
5
tcc.c
@ -1523,7 +1523,7 @@ static Sym *sym_find2(Sym *s, int v)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* structure lookup */
|
/* structure lookup */
|
||||||
static Sym *struct_find(int v)
|
static inline Sym *struct_find(int v)
|
||||||
{
|
{
|
||||||
v -= TOK_IDENT;
|
v -= TOK_IDENT;
|
||||||
if ((unsigned)v >= (unsigned)(tok_ident - TOK_IDENT))
|
if ((unsigned)v >= (unsigned)(tok_ident - TOK_IDENT))
|
||||||
@ -5843,7 +5843,8 @@ static void struct_decl(CType *type, int u)
|
|||||||
v = tok;
|
v = tok;
|
||||||
next();
|
next();
|
||||||
/* struct already defined ? return it */
|
/* struct already defined ? return it */
|
||||||
/* XXX: check consistency */
|
if (v < TOK_IDENT)
|
||||||
|
expect("struct/union/enum name");
|
||||||
s = struct_find(v);
|
s = struct_find(v);
|
||||||
if (s) {
|
if (s) {
|
||||||
if (s->type.t != a)
|
if (s->type.t != a)
|
||||||
|
Loading…
Reference in New Issue
Block a user