public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-5333] [Ada] Minor refine type of a counter variable
@ 2020-11-25 13:27 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2020-11-25 13:27 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:97a26d19d23e6379d50e4d76bc72c429d78cb17f
commit r11-5333-g97a26d19d23e6379d50e4d76bc72c429d78cb17f
Author: Piotr Trojanek <trojanek@adacore.com>
Date: Fri Oct 9 09:59:22 2020 +0200
[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:
---
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);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-11-25 13:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-25 13:27 [gcc r11-5333] [Ada] Minor refine type of a counter variable Pierre-Marie de Rodat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).