Only check the ast-type of a switch case, not if it's an ACTUAL constant, fteqcc doesn't either... grrr

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-11-25 22:40:35 +01:00
parent 10f49a38ca
commit 08ef8bd045

View file

@ -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;