broke returning NIL

This commit is contained in:
Bill Currie 2004-02-04 02:30:18 +00:00
parent ab4f0e7ca9
commit f79e34628b

View file

@ -1949,11 +1949,15 @@ return_expr (function_t *f, expr_t *e)
t = &type_float;
}
if (t == &type_void) {
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];
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");
//FIXME does anything need to be done here?
}
}
if (!type_assignable (f->def->type->aux_type, t)) {
if (!options.traditional)