aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorGary Dismukes <dismukes@adacore.com>2019-12-12 10:02:09 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2019-12-12 10:02:09 +0000
commite16c6cc3319d1ee613a9c53b86d2e7addd07b13c (patch)
treeaa556060bd3af9e27fb9935498d33b19e791c372 /gcc
parentd5461bed9a1b19840030d47c5ce9b685cd1206c5 (diff)
downloadgcc-e16c6cc3319d1ee613a9c53b86d2e7addd07b13c.zip
gcc-e16c6cc3319d1ee613a9c53b86d2e7addd07b13c.tar.gz
gcc-e16c6cc3319d1ee613a9c53b86d2e7addd07b13c.tar.bz2
[Ada] Fix a number of typos, plus minor reformatting
2019-12-12 Gary Dismukes <dismukes@adacore.com> gcc/ada/ * sem_ch3.adb, sem_util.adb: Minor reformatting. From-SVN: r279283
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog4
-rw-r--r--gcc/ada/sem_ch3.adb14
-rw-r--r--gcc/ada/sem_util.adb18
3 files changed, 19 insertions, 17 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 57df9a2..3d0ede4 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,7 @@
+2019-12-12 Gary Dismukes <dismukes@adacore.com>
+
+ * sem_ch3.adb, sem_util.adb: Minor reformatting.
+
2019-12-12 Bob Duff <duff@adacore.com>
* doc/gnat_ugn/gnat_utility_programs.rst: Update gnatmetric
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index bcee779..c3b8796 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -12973,9 +12973,9 @@ package body Sem_Ch3 is
then
-- If this is a constrained access definition for a record
-- component, we leave the type as an unconstrained access,
- -- and mark the component so that its actual type is build
- -- at a point of use (e.g an assignment statement). THis is
- -- handled in sem_util, Build_Actual_Subtype_Of_Component.
+ -- and mark the component so that its actual type is built
+ -- at a point of use (e.g., an assignment statement). This
+ -- is handled in Sem_Util.Build_Actual_Subtype_Of_Component.
if Desig_Type = Current_Scope
and then No (Def_Id)
@@ -12986,10 +12986,9 @@ package body Sem_Ch3 is
Set_Ekind (Desig_Subtype, E_Record_Subtype);
Def_Id := Entity (Subtype_Mark (S));
- -- We indicate that the component has a pet-object
- -- constraint for uniform treatment at a point of use,
- -- even though the constraint may be independent of
- -- discriminants of enclosing type.
+ -- We indicate that the component has a per-object constraint
+ -- for treatment at a point of use, even though the constraint
+ -- may be independent of discriminants of the enclosing type.
if Nkind (Related_Nod) = N_Component_Declaration then
Set_Has_Per_Object_Constraint
@@ -13003,7 +13002,6 @@ package body Sem_Ch3 is
Constrain_Discriminated_Type
(Desig_Subtype, S, Related_Nod, For_Access => True);
return;
-
end if;
-- Enforce rule that the constraint is illegal if there is an
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index 5d5c520..22ecf21 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -1200,15 +1200,15 @@ package body Sem_Util is
function Build_Access_Record_Constraint (C : List_Id) return List_Id;
-- If the record component is a constrained access to the current
-- record, the subtype has not been constructed during analysis of
- -- the enclosing record type (see Analyze_Access). In that case build
- -- a constrainted access subtype after replacing references to the
- -- enclosing discriminants by the corresponding discriminant values
+ -- the enclosing record type (see Analyze_Access). In that case, build
+ -- a constrained access subtype after replacing references to the
+ -- enclosing discriminants with the corresponding discriminant values
-- of the prefix.
function Build_Actual_Array_Constraint return List_Id;
-- If one or more of the bounds of the component depends on
-- discriminants, build actual constraint using the discriminants
- -- of the prefx, as above.
+ -- of the prefix, as above.
function Build_Actual_Record_Constraint return List_Id;
-- Similar to previous one, for discriminated components constrained
@@ -1306,7 +1306,7 @@ package body Sem_Util is
D_Val : Node_Id;
begin
- -- Retrieve the constraint from the compomnent declaration, because
+ -- Retrieve the constraint from the component declaration, because
-- the component subtype has not been constructed and the component
-- type is an unconstrained access.
@@ -1319,13 +1319,13 @@ package body Sem_Util is
Set_Expression (D_Val,
Make_Selected_Component (Loc,
Prefix => New_Copy_Tree (P),
- Selector_Name =>
+ Selector_Name =>
New_Occurrence_Of (Entity (Expression (D)), Loc)));
elsif Denotes_Discriminant (D) then
D_Val := Make_Selected_Component (Loc,
Prefix => New_Copy_Tree (P),
- Selector_Name => New_Occurrence_Of (Entity (D), Loc));
+ Selector_Name => New_Occurrence_Of (Entity (D), Loc));
else
D_Val := New_Copy_Tree (D);
@@ -1342,7 +1342,7 @@ package body Sem_Util is
begin
-- The subtype does not need to be created for a selected component
- -- in a Spec_Expression,
+ -- in a Spec_Expression.
if In_Spec_Expression then
return Empty;
@@ -1373,7 +1373,7 @@ package body Sem_Util is
end if;
elsif Nkind (N) = N_Selected_Component then
- -- THe entity of the selected compomnent allows us to retrieve
+ -- The entity of the selected component allows us to retrieve
-- the original constraint from its component declaration.
Sel := Entity (Selector_Name (N));