mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-12-03 17:11:57 +00:00
that should have gone into the second to last commit
This commit is contained in:
parent
0f0a458cc4
commit
bb356bffa5
1 changed files with 2 additions and 1 deletions
3
ast.c
3
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)
|
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 (func->curblock->final && !ast_istype(self->exprs[i], ast_label)) {
|
||||||
if (OPTS_FLAG(ALLOW_UNREACHABLE_CODE))
|
if (OPTS_FLAG(ALLOW_UNREACHABLE_CODE))
|
||||||
continue;
|
continue;
|
||||||
compile_error(ast_ctx(self->exprs[i]), "unreachable statement");
|
compile_error(ast_ctx(self->exprs[i]), "unreachable statement");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
gen = self->exprs[i]->expression.codegen;
|
||||||
if (!(*gen)(self->exprs[i], func, false, out))
|
if (!(*gen)(self->exprs[i], func, false, out))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue