mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 07:11:41 +00:00
Drop non-function symbols returned from function_symbol.
In such situations, everything is a mess from earlier errors.
This commit is contained in:
parent
aae0e21a5b
commit
a778d45ebf
1 changed files with 6 additions and 2 deletions
|
@ -426,7 +426,9 @@ external_decl
|
|||
symtab_addsymbol (current_symtab, $1);
|
||||
} else {
|
||||
$1 = function_symbol ($1, spec.is_overload, 1);
|
||||
make_function ($1, 0, $1->table->space, spec.storage);
|
||||
// things might be a confused mess from earlier errors
|
||||
if ($1->sy_type == sy_func)
|
||||
make_function ($1, 0, $1->table->space, spec.storage);
|
||||
}
|
||||
}
|
||||
;
|
||||
|
@ -966,7 +968,9 @@ non_code_func
|
|||
symbol_t *sym = $<symbol>0;
|
||||
specifier_t spec = $<spec>-1;
|
||||
if (!local_expr && sym->type->type != ev_field) {
|
||||
make_function (sym, 0, sym->table->space, spec.storage);
|
||||
// things might be a confused mess from earlier errors
|
||||
if (sym->sy_type == sy_func)
|
||||
make_function (sym, 0, sym->table->space, spec.storage);
|
||||
} else {
|
||||
initialize_def (sym, sym->type, 0, current_symtab->space,
|
||||
spec.storage);
|
||||
|
|
Loading…
Reference in a new issue