aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2021-10-26 17:57:59 +0200
committerPierre-Marie de Rodat <derodat@adacore.com>2021-11-09 09:44:47 +0000
commit1275c4031a7d3b55e127cab53f31362469f8c89b (patch)
treef57b11ae65a91ea5f69fb3234f5973f4cafeb3a8
parentc9148106881e8e25efc14ec7d49a71f5af4f13f1 (diff)
downloadgcc-1275c4031a7d3b55e127cab53f31362469f8c89b.zip
gcc-1275c4031a7d3b55e127cab53f31362469f8c89b.tar.gz
gcc-1275c4031a7d3b55e127cab53f31362469f8c89b.tar.bz2
[Ada] Tune comment about expansion of array equality
gcc/ada/ * exp_ch4.adb (Arr_Attr): Refine type of the parameter from Int to Pos; refine name of the parameter from Num to Dim; fix reference to "Expr" in comment.
-rw-r--r--gcc/ada/exp_ch4.adb8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb
index 1eebde4..93dffb6 100644
--- a/gcc/ada/exp_ch4.adb
+++ b/gcc/ada/exp_ch4.adb
@@ -1625,8 +1625,8 @@ package body Exp_Ch4 is
function Arr_Attr
(Arr : Entity_Id;
Nam : Name_Id;
- Num : Int) return Node_Id;
- -- This builds the attribute reference Arr'Nam (Expr)
+ Dim : Pos) return Node_Id;
+ -- This builds the attribute reference Arr'Nam (Dim)
function Component_Equality (Typ : Entity_Id) return Node_Id;
-- Create one statement to compare corresponding components, designated
@@ -1691,14 +1691,14 @@ package body Exp_Ch4 is
function Arr_Attr
(Arr : Entity_Id;
Nam : Name_Id;
- Num : Int) return Node_Id
+ Dim : Pos) return Node_Id
is
begin
return
Make_Attribute_Reference (Loc,
Attribute_Name => Nam,
Prefix => New_Occurrence_Of (Arr, Loc),
- Expressions => New_List (Make_Integer_Literal (Loc, Num)));
+ Expressions => New_List (Make_Integer_Literal (Loc, Dim)));
end Arr_Attr;
------------------------