mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
broke returning NIL
This commit is contained in:
parent
ab4f0e7ca9
commit
f79e34628b
1 changed files with 9 additions and 5 deletions
|
@ -1949,11 +1949,15 @@ return_expr (function_t *f, expr_t *e)
|
|||
t = &type_float;
|
||||
}
|
||||
if (t == &type_void) {
|
||||
if (e->type == ex_nil) {
|
||||
t = f->def->type->aux_type;
|
||||
e->type = expr_types[t->type];
|
||||
} else {
|
||||
if (!options.traditional)
|
||||
return error (e, "void value not ignored as it ought to be");
|
||||
warning (e, "void value not ignored as it ought to be");
|
||||
t = f->def->type->aux_type;
|
||||
e->type = expr_types[t->type];
|
||||
//FIXME does anything need to be done here?
|
||||
}
|
||||
}
|
||||
if (!type_assignable (f->def->type->aux_type, t)) {
|
||||
if (!options.traditional)
|
||||
|
|
Loading…
Reference in a new issue