From 0b4034c06b376f1219925546eb1006a2627ca336 Mon Sep 17 00:00:00 2001 From: Gary Dismukes Date: Mon, 1 Jun 2020 15:22:48 -0400 Subject: [PATCH] [Ada] Minor reformatting of comments and some code, plus a typo correction gcc/ada/ * exp_ch6.adb: Add a comma and fix a typo (machinary => machinery) in comment. * exp_aggr.adb: Reformat, fix capitalization, and add a couple of commas in a comment. Adjust columns in several code fragments. * sem_aggr.adb: Reformat and add a comma in a comment. --- gcc/ada/exp_aggr.adb | 26 +++++++++++++------------- gcc/ada/exp_ch6.adb | 4 ++-- gcc/ada/sem_aggr.adb | 8 ++++---- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb index bd3a10b17b0..6d58c8c5913 100644 --- a/gcc/ada/exp_aggr.adb +++ b/gcc/ada/exp_aggr.adb @@ -6922,17 +6922,17 @@ package body Exp_Aggr is Defining_Identifier => Loop_Id, Discrete_Subtype_Definition => L_Range)); - -- Build insertion statement. for a positional aggregate only - -- the expression is needed. For a named aggregate the loop - -- variable, whose type is that of the key, is an additional - -- parameter for the insertion operation. + -- Build insertion statement. For a positional aggregate, only the + -- expression is needed. For a named aggregate, the loop variable, + -- whose type is that of the key, is an additional parameter for + -- the insertion operation. if Present (Add_Unnamed_Subp) then Stats := New_List (Make_Procedure_Call_Statement (Loc, - Name => New_Occurrence_Of (Entity (Add_Unnamed_Subp), Loc), - Parameter_Associations => - New_List (New_Occurrence_Of (Temp, Loc), + Name => New_Occurrence_Of (Entity (Add_Unnamed_Subp), Loc), + Parameter_Associations => + New_List (New_Occurrence_Of (Temp, Loc), New_Copy_Tree (Expr)))); else Stats := New_List @@ -6940,8 +6940,8 @@ package body Exp_Aggr is Name => New_Occurrence_Of (Entity (Add_Named_Subp), Loc), Parameter_Associations => New_List (New_Occurrence_Of (Temp, Loc), - New_Occurrence_Of (Loop_Id, Loc), - New_Copy_Tree (Expr)))); + New_Occurrence_Of (Loop_Id, Loc), + New_Copy_Tree (Expr)))); end if; Loop_Stat := Make_Implicit_Loop_Statement @@ -6990,7 +6990,7 @@ package body Exp_Aggr is Name => New_Occurrence_Of (Insert, Loc), Parameter_Associations => New_List (New_Occurrence_Of (Temp, Loc), - New_Copy_Tree (Comp))); + New_Copy_Tree (Comp))); Append (Stat, Aggr_Code); Next (Comp); end loop; @@ -7013,7 +7013,7 @@ package body Exp_Aggr is begin Comp := First (Component_Associations (N)); - -- Each component association may contain several choices, + -- Each component association may contain several choices; -- generate an insertion statement for each. while Present (Comp) loop @@ -7027,8 +7027,8 @@ package body Exp_Aggr is Name => New_Occurrence_Of (Insert, Loc), Parameter_Associations => New_List (New_Occurrence_Of (Temp, Loc), - New_Copy_Tree (Key), - New_Copy_Tree (Expression (Comp)))); + New_Copy_Tree (Key), + New_Copy_Tree (Expression (Comp)))); Append (Stat, Aggr_Code); Next (Key); diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index bb9b150f6a0..5bc8bf59fef 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -9733,8 +9733,8 @@ package body Exp_Ch6 is Expression => New_Copy_Tree (BIP_Func_Call)))); -- Manually set the associated node for the anonymous access type to - -- be its local declaration to avoid confusing and complicating - -- the accessibility machinary. + -- be its local declaration, to avoid confusing and complicating + -- the accessibility machinery. Set_Associated_Node_For_Itype (Anon_Type, Tmp_Decl); diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb index b3c04eb7989..31496bee1dd 100644 --- a/gcc/ada/sem_aggr.adb +++ b/gcc/ada/sem_aggr.adb @@ -2648,11 +2648,11 @@ package body Sem_Aggr is (Comp : Node_Id; Key_Type : Entity_Id; Elmt_Type : Entity_Id); - -- Resolve choices and expression in an iterated component - -- association. This is similar but not identical to the handling - -- of this construct in an array aggregate. + -- Resolve choices and expression in an iterated component association. + -- This is similar but not identical to the handling of this construct + -- in an array aggregate. -- For a named container, the type of each choice must be compatible - -- with the key type. For a positional container the choice must be + -- with the key type. For a positional container, the choice must be -- a subtype indication or an iterator specification that determines -- an element type. -- 2.30.2