X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fgmqcc.git;a=blobdiff_plain;f=parser.cpp;h=ddde65469ec77e7cb596e58451dc88096c5ad8f1;hp=0560849e35719956c4f8f6c86bf05fdf319461a9;hb=d9127bf28ad5c1f7626487bbc5f29e72e9912d67;hpb=fa7dce495b2600023ca649ed8186d3ffa90fb150 diff --git a/parser.cpp b/parser.cpp index 0560849..ddde654 100644 --- a/parser.cpp +++ b/parser.cpp @@ -3159,6 +3159,7 @@ static bool parse_switch_go(parser_t *parser, ast_block *block, ast_expression * } if (!OPTS_FLAG(RELAXED_SWITCH)) { if (!ast_istype(swcase.m_value, ast_value)) { /* || ((ast_value*)swcase.m_value)->m_cvq != CV_CONST) { */ + delete switchnode; parseerror(parser, "case on non-constant values need to be explicitly enabled via -frelaxed-switch"); ast_unref(operand); return false;