mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-04-25 02:52:06 +00:00
Allocate space for function parameters.
This commit is contained in:
parent
f45919df09
commit
849d013f5e
1 changed files with 2 additions and 0 deletions
|
@ -428,6 +428,7 @@ build_scope (symbol_t *fsym, symtab_t *parent)
|
||||||
|
|
||||||
if (fsym->type->t.func.num_params < 0) {
|
if (fsym->type->t.func.num_params < 0) {
|
||||||
args = new_symbol_type (".args", &type_va_list);
|
args = new_symbol_type (".args", &type_va_list);
|
||||||
|
initialize_def (args, args->type, 0, symtab->space, st_local);
|
||||||
symtab_addsymbol (symtab, args);
|
symtab_addsymbol (symtab, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -437,6 +438,7 @@ build_scope (symbol_t *fsym, symtab_t *parent)
|
||||||
if (!p->type)
|
if (!p->type)
|
||||||
continue; // non-param selector
|
continue; // non-param selector
|
||||||
param = new_symbol_type (p->name, p->type);
|
param = new_symbol_type (p->name, p->type);
|
||||||
|
initialize_def (param, param->type, 0, symtab->space, st_local);
|
||||||
symtab_addsymbol (symtab, param);
|
symtab_addsymbol (symtab, param);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue