mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-17 09:22:43 +00:00
Support return in void functions in v6 code.
This commit is contained in:
parent
1246fd9e30
commit
5a78758781
1 changed files with 7 additions and 2 deletions
|
@ -925,8 +925,13 @@ statement_uexpr (sblock_t *sblock, expr_t *e)
|
|||
case 'r':
|
||||
debug (e, "RETURN");
|
||||
opcode = "<RETURN>";
|
||||
if (!e->e.expr.e1 && !options.traditional)
|
||||
opcode = "<RETURN_V>";
|
||||
if (!e->e.expr.e1) {
|
||||
if (options.code.progsversion != PROG_ID_VERSION) {
|
||||
opcode = "<RETURN_V>";
|
||||
} else {
|
||||
e->e.expr.e1 = new_float_expr (0);
|
||||
}
|
||||
}
|
||||
s = new_statement (opcode, e);
|
||||
if (e->e.expr.e1)
|
||||
sblock = statement_subexpr (sblock, e->e.expr.e1, &s->opa);
|
||||
|
|
Loading…
Reference in a new issue