https://gcc.gnu.org/g:e0dfc10707dcc78e21bc239de127603ec9e1050a
commit r15-6533-ge0dfc10707dcc78e21bc239de127603ec9e1050a Author: Piotr Trojanek <troja...@adacore.com> Date: Wed Dec 4 19:23:08 2024 +0100 ada: Refine subtype of a universal arithmetic utility routine Code cleanup; semantics is unaffected. gcc/ada/ChangeLog: * uintp.adb (N_Digits): Refine return subtype, since this routine always returns a positive number of digits. Diff: --- gcc/ada/uintp.adb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/ada/uintp.adb b/gcc/ada/uintp.adb index fc548e02d570..59ed5b045889 100644 --- a/gcc/ada/uintp.adb +++ b/gcc/ada/uintp.adb @@ -174,7 +174,7 @@ package body Uintp is -- K is as small as possible S.T. Right_Hat < Base * Base. It is required -- that Left >= Right for the algorithm to work. - function N_Digits (Input : Valid_Uint) return Int; + function N_Digits (Input : Valid_Uint) return Pos; pragma Inline (N_Digits); -- Returns number of "digits" in a Uint @@ -603,7 +603,7 @@ package body Uintp is -- N_Digits -- --------------- - function N_Digits (Input : Valid_Uint) return Int is + function N_Digits (Input : Valid_Uint) return Pos is begin if Direct (Input) then if Direct_Val (Input) >= Base then