1
0
mirror of https://github.com/cc65/cc65.git synced 2025-02-21 20:29:17 +00:00

another addition fix

This commit is contained in:
mrdudz 2023-08-30 02:11:47 +02:00
parent 771155ff02
commit babaf98040

View File

@ -3302,9 +3302,20 @@ static void parseadd (ExprDesc* Expr, int DoArrayRef)
/* Integer addition */
flags |= typeadjust (Expr, &Expr2, 1);
} else if (!DoArrayRef && IsClassFloat (lhst) && IsClassFloat (rhst)) {
/* Float addition */
/* Float const + float var addition */
LOG(("%s:%d float addition (const + var)\n", __FILE__, __LINE__));
flags |= typeadjust (Expr, &Expr2, 1);
#if 1
} else if (!DoArrayRef && IsClassFloat (lhst) && IsClassInt (rhst)) {
//printf("const 1\n");
/* Float const + int var addition */
LOG(("%s:%d float addition (float const + int var)\n", __FILE__, __LINE__));
flags |= typeadjust (Expr, &Expr2, 1);
#endif
} else if (!DoArrayRef && IsClassInt (lhst) && IsClassFloat (rhst)) {
//printf("const 2\n");
/* FIXME: int const + Float var addition */
LOG(("%s:%d float addition (int const + float var)\n", __FILE__, __LINE__));
} else {
/* OOPS */
LOG(("%s:%d OOPS\n", __FILE__, __LINE__));