mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +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) {
|
||||
args = new_symbol_type (".args", &type_va_list);
|
||||
initialize_def (args, args->type, 0, symtab->space, st_local);
|
||||
symtab_addsymbol (symtab, args);
|
||||
}
|
||||
|
||||
|
@ -437,6 +438,7 @@ build_scope (symbol_t *fsym, symtab_t *parent)
|
|||
if (!p->type)
|
||||
continue; // non-param selector
|
||||
param = new_symbol_type (p->name, p->type);
|
||||
initialize_def (param, param->type, 0, symtab->space, st_local);
|
||||
symtab_addsymbol (symtab, param);
|
||||
i++;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue