]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Allow regular AND used on non-float types
authorWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 25 Nov 2012 17:56:22 +0000 (18:56 +0100)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 25 Nov 2012 17:56:22 +0000 (18:56 +0100)
parser.c

index 5cbdb16d80c508d8021727d3650006b78b85f1e3..f53f60344ac4324fc22514e2047b8bc9057858d8 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -808,6 +808,7 @@ static bool parser_sy_pop(parser_t *parser, shunt *sy)
             generated_op += 1; /* INSTR_OR */
         case opid2('&','&'):
             generated_op += INSTR_AND;
+#if 0
             if (NotSameType(TYPE_FLOAT)) {
                 parseerror(parser, "invalid types used in expression: cannot perform logical operations between types %s and %s",
                            type_name[exprs[0]->expression.vtype],
@@ -816,6 +817,7 @@ static bool parser_sy_pop(parser_t *parser, shunt *sy)
                 parseerror(parser, "TODO: optional early out");
                 return false;
             }
+#endif
             if (opts_standard == COMPILER_GMQCC)
                 con_out("TODO: early out logic\n");
             if (CanConstFold(exprs[0], exprs[1]))