From: Wolfgang (Blub) Bumiller Date: Sun, 25 Nov 2012 21:40:35 +0000 (+0100) Subject: Only check the ast-type of a switch case, not if it's an ACTUAL constant, fteqcc... X-Git-Tag: 0.1.9~221 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=08ef8bd045772815a21049907b9f473953a8a27a;p=xonotic%2Fgmqcc.git Only check the ast-type of a switch case, not if it's an ACTUAL constant, fteqcc doesn't either... grrr --- diff --git a/parser.c b/parser.c index 3ea3e44..753f184 100644 --- a/parser.c +++ b/parser.c @@ -2162,7 +2162,7 @@ static bool parse_switch(parser_t *parser, ast_block *block, ast_expression **ou } if (!OPTS_FLAG(RELAXED_SWITCH)) { opval = (ast_value*)swcase.value; - if (!ast_istype(swcase.value, ast_value) || !opval->constant) { + if (!ast_istype(swcase.value, ast_value)) { /* || !opval->constant) { */ parseerror(parser, "case on non-constant values need to be explicitly enabled via -frelaxed-switch"); ast_unref(operand); return false;