mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-31 13:10:34 +00:00
Fix the wrong space for static vars.
Turns out there was only one place to fix (for qc, anyway: I don't have tests for qp yet). func-static now passes :) Hmm, how to test for static var naming... (not implemented yet)
This commit is contained in:
parent
6074a6648f
commit
7ccfd7b9e0
1 changed files with 5 additions and 2 deletions
|
@ -852,12 +852,15 @@ decl
|
|||
{
|
||||
specifier_t spec = $<spec>0;
|
||||
type_t *type;
|
||||
storage_class_t sc = $<spec>0.storage;
|
||||
struct defspace_s *space = current_symtab->space;
|
||||
|
||||
if (!spec.type)
|
||||
spec.type = type_default;
|
||||
if (sc == sc_static)
|
||||
space = pr.near_data;
|
||||
type = find_type (append_type ($1->type, spec.type));
|
||||
initialize_def ($1, type, $2, current_symtab->space,
|
||||
$<spec>0.storage);
|
||||
initialize_def ($1, type, $2, space, sc);
|
||||
}
|
||||
;
|
||||
|
||||
|
|
Loading…
Reference in a new issue