mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
Allow zero size arrays to match sized arrays of the same type.
This allows externally declared arrays to not specify a size.
This commit is contained in:
parent
b2d4aee61e
commit
b3da6ef3d4
1 changed files with 7 additions and 2 deletions
|
@ -199,8 +199,13 @@ make_symbol (const char *name, type_t *type, defspace_t *space,
|
|||
sym = new_symbol_type (name, type);
|
||||
}
|
||||
if (sym->type != type) {
|
||||
error (0, "%s redefined", name);
|
||||
sym = new_symbol_type (name, type);
|
||||
if (is_array (sym->type) && is_array (type)
|
||||
&& !sym->type->t.array.size) {
|
||||
sym->type = type;
|
||||
} else {
|
||||
error (0, "%s redefined", name);
|
||||
sym = new_symbol_type (name, type);
|
||||
}
|
||||
}
|
||||
if (sym->s.def && sym->s.def->external && storage != st_extern) {
|
||||
relocs = sym->s.def->relocs;
|
||||
|
|
Loading…
Reference in a new issue