X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fgmqcc.git;a=blobdiff_plain;f=parser.cpp;h=7bb2a10f8f2401f783feebed27da3fb12fac980f;hp=51f7e1ea6c571d20b158953b803b306f52f1c35d;hb=8538658e830e2860799ef25f81983ef60a422cc6;hpb=167207e98c1f1253f69bc044aafc9cbea6bccf36 diff --git a/parser.cpp b/parser.cpp index 51f7e1e..7bb2a10 100644 --- a/parser.cpp +++ b/parser.cpp @@ -3127,6 +3127,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;