make autoconvertion work for return

This commit is contained in:
Bill Currie 2004-02-06 08:40:28 +00:00
parent 080b973479
commit 1d800caab7

View file

@ -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);
}