]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Typo corrections and minor reformatting
authorGary Dismukes <dismukes@adacore.com>
Thu, 12 Dec 2019 18:40:50 +0000 (13:40 -0500)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 2 Jun 2020 08:58:03 +0000 (04:58 -0400)
2020-06-02  Gary Dismukes  <dismukes@adacore.com>

gcc/ada/

* exp_attr.adb, par-ch4.adb, par-util.adb, scans.ads, scng.adb,
sem_attr.adb, sem_ch4.adb, sinfo.ads: Typo corrections and minor
reformatting.

gcc/ada/exp_attr.adb
gcc/ada/par-ch4.adb
gcc/ada/par-util.adb
gcc/ada/scans.ads
gcc/ada/scng.adb
gcc/ada/sem_attr.adb
gcc/ada/sem_ch4.adb
gcc/ada/sinfo.ads

index 4057a36dc11c87ed767edcb404d1f14e6d6d7f4a..d658f0b3c987db75ecaa1c7b99bd7ee93a25d0eb 100644 (file)
@@ -5476,18 +5476,18 @@ package body Exp_Attr is
             Typ     : constant Entity_Id := Etype (N);
             New_Loop : Node_Id;
 
-         --  If the prefix is an aggregwte, its unique component is sn
-         --  Iterated_Element, and we create a loop out of its itertor.
+         --  If the prefix is an aggregate, its unique component is an
+         --  Iterated_Element, and we create a loop out of its iterator.
 
          begin
             if Nkind (Prefix (N)) = N_Aggregate then
                declare
                   Stream  : constant Node_Id :=
-                     First (Component_Associations (Prefix (N)));
+                              First (Component_Associations (Prefix (N)));
                   Id      : constant Node_Id := Defining_Identifier (Stream);
                   Expr    : constant Node_Id := Expression (Stream);
                   Ch      : constant Node_Id :=
-                               First (Discrete_Choices (Stream));
+                              First (Discrete_Choices (Stream));
                begin
                   New_Loop := Make_Loop_Statement (Loc,
                     Iteration_Scheme =>
@@ -5509,9 +5509,9 @@ package body Exp_Attr is
                               Relocate_Node (Expr))))));
                end;
             else
-               --  If the prefix is a name we construct an element iterwtor
-               --  over it. Its expansion will verify that it is an array
-               --  or a container with the proper aspects.
+               --  If the prefix is a name, we construct an element iterator
+               --  over it. Its expansion will verify that it is an array or
+               --  a container with the proper aspects.
 
                declare
                   Iter : Node_Id;
index 355aeb87c7831c89a247067b8c335e4d7a9d456f..f67e392bd259a4374b7ff758fdf5a17be8c52f79 100644 (file)
@@ -1385,7 +1385,7 @@ package body Ch4 is
       if Token = Tok_Left_Bracket and then Ada_Version >= Ada_2020 then
          Scan;
 
-         --  Special case for null aggregate in Ada2020.
+         --  Special case for null aggregate in Ada 2020
 
          if Token = Tok_Right_Bracket then
             Scan;   --  past ]
index 6379c4aa2cb2f4a3948f52768c9687caca5a314f..700f9469febaac9f6b89f9eb07fd5a5c0a9649c2 100644 (file)
@@ -276,7 +276,7 @@ package body Util is
 
       --  If we have a right paren, then that is taken as ending the list
       --  i.e. no comma is present.
-      --  Ditto for a right bracket in Ada2020.
+      --  Ditto for a right bracket in Ada 2020.
 
       elsif Token = Tok_Right_Paren
         or else (Token = Tok_Right_Bracket and then Ada_Version >= Ada_2020)
index 530da548466e73f1713da0c063a236c60887e626..1cb853693a46a93d0140cc836de835cfaf6c525a 100644 (file)
@@ -87,7 +87,7 @@ package Scans is
       --  exception-name". This degrades error recovery slightly, and perhaps
       --  we could do better, but not worth the effort.
 
-      --  Ada2020 introduces square brackets as delimiters for array and
+      --  Ada 2020 introduces square brackets as delimiters for array and
       --  container aggregates.
 
       Tok_Raise,           -- RAISE
index d4c1916a13a3d1e7b2d9dc02664f9ff521919b32..35e1e47e0fee98eb0eed341af589cab3efb7e61b 100644 (file)
@@ -2181,8 +2181,8 @@ package body Scng is
 
             return;
 
-         --  Right bracket or right brace, treated as right paren
-         --  but proper aggregate delimiter in Ada_2020
+         --  Right bracket or right brace, treated as right paren but proper
+         --  aggregate delimiter in Ada 2020.
 
          when ']' | '}' =>
             if Ada_Version >= Ada_2020 then
index 190d281e4558f7b5bced31b42a7063161b3cbe43..8f875cd5355d4bbf8f0d90b21eb722afbee9e1ff 100644 (file)
@@ -5513,10 +5513,10 @@ package body Sem_Attr is
                --  Prefix is a name, as for other attributes.
 
                --  If the object is a function we asume that it is not
-               --  overloaded. AI12-242 does not suggest an name resulution
-               --  rule for that case, but can suppose that the expected
-               --  type of the reduction is the expected type of the
-               --  component of the prefix.
+               --  overloaded. AI12-242 does not suggest a name resolution
+               --  rule for that case, but we can suppose that the expected
+               --  type of the reduction is the expected type of the component
+               --  of the prefix.
 
                Analyze_And_Resolve (Stream);
                Typ := Etype (Stream);
index 702f2650ea6032e9eff2421f443426abd7f65d74..6391d830e71c3ccda64a459bd7ba666ffd691fc3 100644 (file)
@@ -8290,8 +8290,8 @@ package body Sem_Ch4 is
       --  the Controlled types. The code below is motivated by containers that
       --  are derived from other types with a Reference aspect.
       --  Note as well that we need to examine the base type, given that
-      --  the container object may be a constrained subtype or itype which
-      --  does not have an explicit declaration,
+      --  the container object may be a constrained subtype or itype that
+      --  does not have an explicit declaration.
 
       elsif Is_Derived_Type (C_Type)
         and then Etype (First_Formal (Entity (Func_Name))) /= Pref_Typ
index 706007b8dd06ae3806cb1765545986171f0170b5..55ed10bc4bb7207615c0ce90a2307122371727be 100644 (file)
@@ -1838,7 +1838,7 @@ package Sinfo is
    --      Test_Case
 
    --  Is_Homogeneous_Aggregate (Flag14)
-   --    A flag set on an Ada2020 aggregate that uses square brackets as
+   --    A flag set on an Ada 2020 aggregate that uses square brackets as
    --    delimiters, and thus denotes an array or container aggregate, or
    --    the prefix of a reduction attribute.