mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
make void functions actually return float in traditional mode (qcc allowed
things like foo = void_function)
This commit is contained in:
parent
387464a27c
commit
91207c0180
1 changed files with 2 additions and 0 deletions
|
@ -2122,6 +2122,8 @@ function_expr (expr_t *e1, expr_t *e2)
|
||||||
append_expr (call, e);
|
append_expr (call, e);
|
||||||
if (ftype->aux_type != &type_void) {
|
if (ftype->aux_type != &type_void) {
|
||||||
call->e.block.result = new_ret_expr (ftype->aux_type);
|
call->e.block.result = new_ret_expr (ftype->aux_type);
|
||||||
|
} else if (options.traditional) {
|
||||||
|
call->e.block.result = new_ret_expr (&type_float);
|
||||||
}
|
}
|
||||||
return call;
|
return call;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue