From: Wolfgang (Blub) Bumiller Date: Fri, 30 Nov 2012 11:28:51 +0000 (+0100) Subject: ast_loop with no condition and no incrementor are 'for(;;)' and need to loop endlessl... X-Git-Tag: 0.1.9~191 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9841bc2f0d50c324e3d2bfe1163d4f2b6fbbc6ba;p=xonotic%2Fgmqcc.git ast_loop with no condition and no incrementor are 'for(;;)' and need to loop endlessly instead of once... --- diff --git a/ast.c b/ast.c index 417fc15..ead4ea9 100644 --- a/ast.c +++ b/ast.c @@ -1458,8 +1458,8 @@ bool ast_function_codegen(ast_function *self, ir_builder *ir) { /* error("missing return"); */ if (compile_warning(ast_ctx(self), WARN_MISSING_RETURN_VALUES, - "control reaches end of non-void function (`%s`)", - self->name)) + "control reaches end of non-void function (`%s`) via %s", + self->name, self->curblock->label)) { return false; } @@ -2475,7 +2475,7 @@ bool ast_loop_codegen(ast_loop *self, ast_function *func, bool lvalue, ir_value if (bincrement) tmpblock = bincrement; else if (bpostcond) tmpblock = bpostcond; else if (bprecond) tmpblock = bprecond; - else tmpblock = bout; + else tmpblock = bbody; if (!end_bbody->final && !ir_block_create_jump(end_bbody, tmpblock)) return false; }