From: Piotr Trojanek <troja...@adacore.com> Propagate strict subtypes from callees to the caller; code cleanup.
gcc/ada/ChangeLog: * cstand.adb (Build_Float_Type, Register_Float_Type): Refine parameter subtypes. * set_targ.ads (FPT_Mode_Entry): Refine component subtype. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/cstand.adb | 10 +++++----- gcc/ada/set_targ.ads | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gcc/ada/cstand.adb b/gcc/ada/cstand.adb index 14c7496fa61..28c32690b48 100644 --- a/gcc/ada/cstand.adb +++ b/gcc/ada/cstand.adb @@ -67,10 +67,10 @@ package body CStand is procedure Build_Float_Type (E : Entity_Id; - Digs : Int; + Digs : Pos; Rep : Float_Rep_Kind; Siz : Int; - Align : Int); + Align : Nat); -- Procedure to build standard predefined float base type. The first -- parameter is the entity for the type. The second parameter is the -- digits value. The third parameter indicates the representation to @@ -192,10 +192,10 @@ package body CStand is procedure Build_Float_Type (E : Entity_Id; - Digs : Int; + Digs : Pos; Rep : Float_Rep_Kind; Siz : Int; - Align : Int) + Align : Nat) is begin Set_Type_Definition (Parent (E), @@ -2086,7 +2086,7 @@ package body CStand is Set_Defining_Identifier (New_Node (N_Full_Type_Declaration, Stloc), Ent); Set_Scope (Ent, Standard_Standard); Build_Float_Type - (Ent, Pos (Digs), Float_Rep, Int (Size), Int (Alignment / 8)); + (Ent, Pos (Digs), Float_Rep, Int (Size), Nat (Alignment / 8)); Append_New_Elmt (Ent, Back_End_Float_Types); end Register_Float_Type; diff --git a/gcc/ada/set_targ.ads b/gcc/ada/set_targ.ads index b2e598fbb96..e465c3ff5a1 100644 --- a/gcc/ada/set_targ.ads +++ b/gcc/ada/set_targ.ads @@ -93,7 +93,7 @@ package Set_Targ is type FPT_Mode_Entry is record NAME : String_Ptr; -- Name of mode (no null character at end) - DIGS : Natural; -- Digits for floating-point type + DIGS : Positive; -- Digits for floating-point type FLOAT_REP : Float_Rep_Kind; -- Float representation PRECISION : Natural; -- Precision in bits SIZE : Natural; -- Size in bits -- 2.43.0