accidental tabs, printf long expectts explicit %ld
This commit is contained in:
@@ -671,8 +671,8 @@ const Type* ArithmeticConvert (const Type* lhst, const Type* rhst)
|
|||||||
** The integral promotions are performed on both operands.
|
** The integral promotions are performed on both operands.
|
||||||
*/
|
*/
|
||||||
if (IsClassFloat(lhst) || IsClassFloat(rhst)) {
|
if (IsClassFloat(lhst) || IsClassFloat(rhst)) {
|
||||||
Error ("Floating point arithmetic not supported.");
|
Error ("Floating point arithmetic not supported.");
|
||||||
return type_long;
|
return type_long;
|
||||||
}
|
}
|
||||||
lhst = IntPromotion (lhst);
|
lhst = IntPromotion (lhst);
|
||||||
rhst = IntPromotion (rhst);
|
rhst = IntPromotion (rhst);
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ static void DoConversion (ExprDesc* Expr, const Type* NewType, int Explicit)
|
|||||||
if (IsClassFloat (OldType) && IsClassInt (NewType)) {
|
if (IsClassFloat (OldType) && IsClassInt (NewType)) {
|
||||||
long IVal = (long)Expr->V.FVal.V;
|
long IVal = (long)Expr->V.FVal.V;
|
||||||
if ((Expr->V.FVal.V != FP_D_FromInt(IVal).V) && !Explicit) {
|
if ((Expr->V.FVal.V != FP_D_FromInt(IVal).V) && !Explicit) {
|
||||||
Warning ("Floating point constant (%f) converted to integer loses precision (%d)",Expr->V.FVal.V,IVal);
|
Warning ("Floating point constant (%f) converted to integer loses precision (%ld)",Expr->V.FVal.V,IVal);
|
||||||
}
|
}
|
||||||
Expr->IVal = IVal;
|
Expr->IVal = IVal;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user