[qfcc] Treat C-style function decls as prototypes

This removes the need for extern from the declaration.
This commit is contained in:
Bill Currie 2020-03-27 18:08:26 +09:00
parent 643711ef40
commit 01cf28e436
2 changed files with 3 additions and 3 deletions

View file

@ -487,9 +487,6 @@ external_decl
symtab_addsymbol (current_symtab, $1);
} else {
$1 = function_symbol ($1, spec.is_overload, 1);
// things might be a confused mess from earlier errors
if ($1->sy_type == sy_func)
make_function ($1, 0, $1->table->space, spec.storage);
}
}
;

View file

@ -1314,6 +1314,9 @@ expr_symbol (sblock_t *sblock, expr_t *e, operand_t **op)
} else if (sym->sy_type == sy_const) {
*op = value_operand (sym->s.value, e);
} else if (sym->sy_type == sy_func) {
if (!sym->s.func) {
make_function (sym, 0, pr.symtab->space, sc_extern);
}
*op = def_operand (sym->s.func->def, 0, e);
} else {
internal_error (e, "unexpected symbol type: %s for %s",