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

Give a better error for unsupported floating point arithmetic, instead of internal "Precondition violated" error.

This commit is contained in:
bbbradsmith 2023-05-03 00:06:09 -04:00
parent 52f0e6a29c
commit 7ff74b2c47

View File

@ -670,6 +670,10 @@ const Type* ArithmeticConvert (const Type* lhst, const Type* rhst)
** floating point types are not (yet) supported.
** The integral promotions are performed on both operands.
*/
if (IsClassFloat(lhst) || IsClassFloat(rhst)) {
Error ("Floating point arithmetic not supported.");
return type_long;
}
lhst = IntPromotion (lhst);
rhst = IntPromotion (rhst);