diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2024-12-04 19:23:08 +0100 |
---|---|---|
committer | Marc Poulhiès <dkm@gcc.gnu.org> | 2025-01-03 16:39:13 +0100 |
commit | e0dfc10707dcc78e21bc239de127603ec9e1050a (patch) | |
tree | dd2bfc34082b5fe0af3480bc12646e2f24ae63de /gcc | |
parent | 6bb5439c74a029446c14a4925e52d1b67afced0a (diff) | |
download | gcc-e0dfc10707dcc78e21bc239de127603ec9e1050a.zip gcc-e0dfc10707dcc78e21bc239de127603ec9e1050a.tar.gz gcc-e0dfc10707dcc78e21bc239de127603ec9e1050a.tar.bz2 |
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.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/uintp.adb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/ada/uintp.adb b/gcc/ada/uintp.adb index fc548e0..59ed5b0 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 |