From 97a26d19d23e6379d50e4d76bc72c429d78cb17f Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Fri, 9 Oct 2020 09:59:22 +0200 Subject: [PATCH] [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. --- gcc/ada/exp_attr.adb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); -- 2.30.2