From 08ef8bd045772815a21049907b9f473953a8a27a Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Sun, 25 Nov 2012 22:40:35 +0100 Subject: [PATCH] Only check the ast-type of a switch case, not if it's an ACTUAL constant, fteqcc doesn't either... grrr --- parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.2