mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-01-18 14:21:36 +00:00
Don't error about creating an unreachable statement if the node we're about to generate is an ast_label
This commit is contained in:
parent
e2602e6b87
commit
0301ea7818
1 changed files with 1 additions and 1 deletions
2
ast.c
2
ast.c
|
@ -1516,7 +1516,7 @@ 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;
|
||||
if (func->curblock->final) {
|
||||
if (func->curblock->final && !ast_istype(self->exprs[i], ast_label)) {
|
||||
asterror(ast_ctx(self->exprs[i]), "unreachable statement");
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue