aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2020-10-09 09:59:22 +0200
committerPierre-Marie de Rodat <derodat@adacore.com>2020-11-25 08:22:21 -0500
commit97a26d19d23e6379d50e4d76bc72c429d78cb17f (patch)
tree60f8d1a2548078a9729d54491a7b82c3d7f5d12b
parentbc771e6c3a2b1fe74328639a00531fc0c3923e43 (diff)
downloadgcc-97a26d19d23e6379d50e4d76bc72c429d78cb17f.zip
gcc-97a26d19d23e6379d50e4d76bc72c429d78cb17f.tar.gz
gcc-97a26d19d23e6379d50e4d76bc72c429d78cb17f.tar.bz2
[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.
-rw-r--r--gcc/ada/exp_attr.adb4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/ada/exp_attr.adb b/gcc/ada/exp_attr.adb
index cabe891..a49de21 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);