]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Only check the ast-type of a switch case, not if it's an ACTUAL constant, fteqcc...
authorWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 25 Nov 2012 21:40:35 +0000 (22:40 +0100)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 25 Nov 2012 21:40:35 +0000 (22:40 +0100)
parser.c

index 3ea3e4447e01f0de9a021156645c8668cda28de4..753f1845cf98dd289ab127e77d73328eb618f61c 100644 (file)
--- 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;