From 008f4e19299a79fe31726cf60708b183fedd414e Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 13 Jan 2011 14:50:25 +0900 Subject: [PATCH] Don't return .return in advanced mode. --- tools/qfcc/source/emit.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/qfcc/source/emit.c b/tools/qfcc/source/emit.c index 003ea1407..d7bee43f0 100644 --- a/tools/qfcc/source/emit.c +++ b/tools/qfcc/source/emit.c @@ -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);