From: Eric Botcazou Date: Mon, 26 May 2025 21:56:47 +0000 (+0200) Subject: ada: Use consistent truncation of 'Value for decimal fixed-point types X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0ef4195c17fe7b0b755686b13f65b57eff12dfe4;p=thirdparty%2Fgcc.git ada: Use consistent truncation of 'Value for decimal fixed-point types This uses truncation for all bases instead of for base 10 only. gcc/ada/ChangeLog: * libgnat/s-valued.adb (Integer_to_Decimal): Use truncation for the scaled divide operation performed for bases other than 10. --- diff --git a/gcc/ada/libgnat/s-valued.adb b/gcc/ada/libgnat/s-valued.adb index 4f2e1020466..b7982b6046f 100644 --- a/gcc/ada/libgnat/s-valued.adb +++ b/gcc/ada/libgnat/s-valued.adb @@ -228,9 +228,9 @@ package body System.Value_D is raise Program_Error; end if; - -- Perform a scaled divide operation with rounding to match 'Image + -- Perform a scaled divide operation with truncation - Scaled_Divide (To_Signed (V), Y, Z, Q, R, Round => True); + Scaled_Divide (To_Signed (V), Y, Z, Q, R, Round => False); return Q; end;