mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-02-17 09:02:25 +00:00
Allow regular AND used on non-float types
This commit is contained in:
parent
bf23ed948d
commit
63d89f9f5a
1 changed files with 2 additions and 0 deletions
2
parser.c
2
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]))
|
||||
|
|
Loading…
Reference in a new issue