mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 12:52:46 +00:00
make autoconvertion work for return
This commit is contained in:
parent
080b973479
commit
1d800caab7
1 changed files with 3 additions and 0 deletions
|
@ -1968,6 +1968,9 @@ return_expr (function_t *f, expr_t *e)
|
|||
f->def->name);
|
||||
warning (e, "type mismatch for return value of %s",
|
||||
f->def->name);
|
||||
} else {
|
||||
if (f->def->type->aux_type != t)
|
||||
e = cast_expr (f->def->type->aux_type, e);
|
||||
}
|
||||
return new_unary_expr ('r', e);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue