From: Wolfgang (Blub) Bumiller Date: Mon, 19 Nov 2012 21:17:24 +0000 (+0100) Subject: Add the missing jump from after the actual last case X-Git-Tag: 0.1.9~391 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5c52e817ea157341b5ed5d87609eec5acdfd7a3b;p=xonotic%2Fgmqcc.git Add the missing jump from after the actual last case --- diff --git a/ast.c b/ast.c index c503c65..e7d5f09 100644 --- a/ast.c +++ b/ast.c @@ -2367,6 +2367,14 @@ bool ast_switch_codegen(ast_switch *self, ast_function *func, bool lvalue, ir_va } } + /* Jump from the last bnot to bout */ + if (bfall && !bfall->final && !ir_block_create_jump(bfall, bout)) { + /* + astwarning(ast_ctx(bfall), WARN_???, "missing break after last case"); + */ + return false; + } + /* If there was a default case, put it down here */ if (def_case) { ir_block *bcase;