[Ada] Minor reformatting of comments and some code, plus a typo correction
authorGary Dismukes <dismukes@adacore.com>
Mon, 1 Jun 2020 19:22:48 +0000 (15:22 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 15 Jul 2020 13:42:37 +0000 (09:42 -0400)
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
gcc/ada/exp_ch6.adb
gcc/ada/sem_aggr.adb

index bd3a10b..6d58c8c 100644 (file)
@@ -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);
index bb9b150..5bc8bf5 100644 (file)
@@ -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);
 
index b3c04eb..31496be 100644 (file)
@@ -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.