projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bc771e6
)
[Ada] Minor refine type of a counter variable
author
Piotr Trojanek
<trojanek@adacore.com>
Fri, 9 Oct 2020 07:59:22 +0000
(09:59 +0200)
committer
Pierre-Marie de Rodat
<derodat@adacore.com>
Wed, 25 Nov 2020 13:22:21 +0000
(08:22 -0500)
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
patch
|
blob
|
history
diff --git
a/gcc/ada/exp_attr.adb
b/gcc/ada/exp_attr.adb
index cabe891ade0ea8b09a01e513f797b593fa88b50b..a49de2136902ab4dbf037f34130f64b3e34581e3 100644
(file)
--- 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);