From: Piotr Trojanek Date: Fri, 9 Oct 2020 07:59:22 +0000 (+0200) Subject: [Ada] Minor refine type of a counter variable X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=97a26d19d23e6379d50e4d76bc72c429d78cb17f;p=gcc.git [Ada] Minor refine type of a counter variable gcc/ada/ * exp_attr.adb (Expand_N_Attribute_Reference): A variable that is only incremented in the code has now type Nat; conversion is now unnecessary. --- diff --git a/gcc/ada/exp_attr.adb b/gcc/ada/exp_attr.adb index cabe891ade0..a49de213690 100644 --- a/gcc/ada/exp_attr.adb +++ b/gcc/ada/exp_attr.adb @@ -2822,7 +2822,7 @@ package body Exp_Attr is Id_Kind : constant Entity_Id := RTE (RO_AT_Task_Id); Ent : constant Entity_Id := Entity (Pref); Conctype : constant Entity_Id := Scope (Ent); - Nest_Depth : Integer := 0; + Nest_Depth : Nat := 0; Name : Node_Id; S : Entity_Id; @@ -2885,7 +2885,7 @@ package body Exp_Attr is New_Occurrence_Of (RTE (RE_Task_Entry_Caller), Loc), Parameter_Associations => New_List ( Make_Integer_Literal (Loc, - Intval => Int (Nest_Depth)))))); + Intval => Nest_Depth))))); end if; Analyze_And_Resolve (N, Id_Kind);