mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
Do some sanity checking on storage class and defspace type.
Params and locals in virtual spaces, static vars in backed. Otherwise, whatever (for now). Now func-static.r aborts :)
This commit is contained in:
parent
0585471723
commit
6074a6648f
1 changed files with 5 additions and 0 deletions
|
@ -122,6 +122,11 @@ new_def (const char *name, type_t *type, defspace_t *space,
|
|||
set_storage_bits (def, storage);
|
||||
|
||||
if (space) {
|
||||
if (space->type == ds_virtual && storage == sc_static)
|
||||
internal_error (0, "static in a virtual space");
|
||||
if (space->type != ds_virtual
|
||||
&& (storage == sc_param || storage == sc_local))
|
||||
internal_error (0, "param or local in a non-virtual space");
|
||||
def->space = space;
|
||||
*space->def_tail = def;
|
||||
space->def_tail = &def->next;
|
||||
|
|
Loading…
Reference in a new issue