1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-07 23:29:39 +00:00

Fixed expression type of the result of numeric constant comparison.

This commit is contained in:
acqn 2021-02-15 09:50:40 +08:00 committed by Oliver Schmidt
parent ea0c634e12
commit f2eed38fc8
2 changed files with 4 additions and 1 deletions

View File

@ -2793,6 +2793,9 @@ static void hie_compare (const GenDesc* Ops, /* List of generators */
}
}
/* Get rid of unwanted flags */
ED_MakeConstBool (Expr, Expr->IVal);
/* If the result is constant, this is suspicious when not in
** preprocessor mode.
*/

View File

@ -261,7 +261,7 @@ ExprDesc* ED_MakeConstBool (ExprDesc* Expr, long Value)
{
Expr->Sym = 0;
Expr->Type = type_bool;
Expr->Flags = E_LOC_NONE | E_RTYPE_RVAL | (Expr->Flags & E_HAVE_MARKS);
Expr->Flags = E_LOC_NONE | E_RTYPE_RVAL | (Expr->Flags & E_MASK_KEEP_MAKE);
Expr->Name = 0;
Expr->IVal = Value;
Expr->FVal = FP_D_Make (0.0);