]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
that should have gone into the second to last commit
authorWolfgang Bumiller <blub@speed.at>
Thu, 20 Dec 2012 14:27:15 +0000 (15:27 +0100)
committerWolfgang Bumiller <blub@speed.at>
Thu, 20 Dec 2012 14:27:15 +0000 (15:27 +0100)
ast.c

diff --git a/ast.c b/ast.c
index 8a70549b59338fa48be68f6e2293211594ac99ad..51104b31685c294b333fd4cc3b7e5b2472b1f6e4 100644 (file)
--- a/ast.c
+++ b/ast.c
@@ -1568,13 +1568,14 @@ bool ast_block_codegen(ast_block *self, ast_function *func, bool lvalue, ir_valu
 
     for (i = 0; i < vec_size(self->exprs); ++i)
     {
-        ast_expression_codegen *gen = self->exprs[i]->expression.codegen;
+        ast_expression_codegen *gen;
         if (func->curblock->final && !ast_istype(self->exprs[i], ast_label)) {
             if (OPTS_FLAG(ALLOW_UNREACHABLE_CODE))
                 continue;
             compile_error(ast_ctx(self->exprs[i]), "unreachable statement");
             return false;
         }
+        gen = self->exprs[i]->expression.codegen;
         if (!(*gen)(self->exprs[i], func, false, out))
             return false;
     }