mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 14:20:59 +00:00
[qfcc] Treat C-style function decls as prototypes
This removes the need for extern from the declaration.
This commit is contained in:
parent
643711ef40
commit
01cf28e436
2 changed files with 3 additions and 3 deletions
|
@ -487,9 +487,6 @@ external_decl
|
||||||
symtab_addsymbol (current_symtab, $1);
|
symtab_addsymbol (current_symtab, $1);
|
||||||
} else {
|
} else {
|
||||||
$1 = function_symbol ($1, spec.is_overload, 1);
|
$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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
|
@ -1314,6 +1314,9 @@ expr_symbol (sblock_t *sblock, expr_t *e, operand_t **op)
|
||||||
} else if (sym->sy_type == sy_const) {
|
} else if (sym->sy_type == sy_const) {
|
||||||
*op = value_operand (sym->s.value, e);
|
*op = value_operand (sym->s.value, e);
|
||||||
} else if (sym->sy_type == sy_func) {
|
} 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);
|
*op = def_operand (sym->s.func->def, 0, e);
|
||||||
} else {
|
} else {
|
||||||
internal_error (e, "unexpected symbol type: %s for %s",
|
internal_error (e, "unexpected symbol type: %s for %s",
|
||||||
|
|
Loading…
Reference in a new issue