X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fgmqcc.git;a=blobdiff_plain;f=parser.cpp;h=4f7ea699c5039537dcb9390c7180ca1127554986;hp=63e49d056969f4b3360f697050722c67241f34a9;hb=1580c23556fea4089acf86462fdf28c281d93397;hpb=b14a02e735f8b7bed773d397a35b6fda1e2a368d diff --git a/parser.cpp b/parser.cpp index 63e49d0..4f7ea69 100644 --- a/parser.cpp +++ b/parser.cpp @@ -3163,6 +3163,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;