Don't return .return in advanced mode.

This commit is contained in:
Bill Currie 2011-01-13 14:50:25 +09:00
parent 5b8725ca66
commit 008f4e1929

View file

@ -877,7 +877,10 @@ emit_expr (expr_t *e)
def = 0;
if (e->e.expr.e1)
def = emit_sub_expr (e->e.expr.e1, 0);
if (!def && !options.traditional && op_return_v)
if ((!def || (def->alias
&& !strcmp (def->alias->name, ".return"))
|| (!def->alias && !strcmp (def->name, ".return")))
&& !options.traditional && op_return_v)
emit_statement (e, op_return_v, 0, 0, 0);
else
emit_statement (e, op_return, def, 0, 0);