mirror of
https://github.com/cc65/cc65.git
synced 2025-01-12 17:30:50 +00:00
Give a better error for unsupported floating point arithmetic, instead of internal "Precondition violated" error.
This commit is contained in:
parent
52f0e6a29c
commit
7ff74b2c47
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user