mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
Make struct decls actually work.
find_type() does type comparisons based on tag name for struct/union/enum but when it returns the previous tag (eg, from "struct foo;") the returned type has a null symtab pointer, so setting the symtab pointer in the type before calling find_type() only throws away the symtab. Thus, since find_type() doesn't check the symtab pointer when comparing the types, set the symtab pointer after calling find_type().
This commit is contained in:
parent
acced90101
commit
a19b7ec8f9
1 changed files with 1 additions and 1 deletions
|
@ -129,8 +129,8 @@ build_struct (int su, symbol_t *tag, symtab_t *symtab, type_t *type)
|
|||
symtab->size = size;
|
||||
}
|
||||
}
|
||||
sym->type = find_type (sym->type); // checks the tag, not the symtab
|
||||
sym->type->t.symtab = symtab;
|
||||
sym->type = find_type (sym->type);
|
||||
return sym;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue