From: Piotr Trojanek <troja...@adacore.com>

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.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 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 fc548e02d57..59ed5b04588 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
-- 
2.43.0

Reply via email to