Treat void values as the largest type.

This fixes passing nil through a structure return value.
This commit is contained in:
Bill Currie 2011-03-03 14:56:21 +09:00
parent bad5fddec4
commit 610d775bd1
1 changed files with 2 additions and 0 deletions

View File

@ -168,6 +168,8 @@ emit_value (ex_value_t *value, def_t *def)
clear_immediates ();
}
cn = 0;
if (val.type == ev_void)
val.type = type_nil->type;
switch (val.type) {
case ev_entity:
tab = entity_imm_defs;