From dab8e60838bf68a159046082607fc7a1a04329f6 Mon Sep 17 00:00:00 2001 From: Gary Dismukes Date: Thu, 12 Dec 2019 13:40:50 -0500 Subject: [PATCH] [Ada] Typo corrections and minor reformatting 2020-06-02 Gary Dismukes 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 | 14 +++++++------- gcc/ada/par-ch4.adb | 2 +- gcc/ada/par-util.adb | 2 +- gcc/ada/scans.ads | 2 +- gcc/ada/scng.adb | 4 ++-- gcc/ada/sem_attr.adb | 8 ++++---- gcc/ada/sem_ch4.adb | 4 ++-- gcc/ada/sinfo.ads | 2 +- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/gcc/ada/exp_attr.adb b/gcc/ada/exp_attr.adb index 4057a36dc11..d658f0b3c98 100644 --- a/gcc/ada/exp_attr.adb +++ b/gcc/ada/exp_attr.adb @@ -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; diff --git a/gcc/ada/par-ch4.adb b/gcc/ada/par-ch4.adb index 355aeb87c78..f67e392bd25 100644 --- a/gcc/ada/par-ch4.adb +++ b/gcc/ada/par-ch4.adb @@ -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 ] diff --git a/gcc/ada/par-util.adb b/gcc/ada/par-util.adb index 6379c4aa2cb..700f9469feb 100644 --- a/gcc/ada/par-util.adb +++ b/gcc/ada/par-util.adb @@ -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) diff --git a/gcc/ada/scans.ads b/gcc/ada/scans.ads index 530da548466..1cb853693a4 100644 --- a/gcc/ada/scans.ads +++ b/gcc/ada/scans.ads @@ -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 diff --git a/gcc/ada/scng.adb b/gcc/ada/scng.adb index d4c1916a13a..35e1e47e0fe 100644 --- a/gcc/ada/scng.adb +++ b/gcc/ada/scng.adb @@ -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 diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 190d281e455..8f875cd5355 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -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); diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb index 702f2650ea6..6391d830e71 100644 --- a/gcc/ada/sem_ch4.adb +++ b/gcc/ada/sem_ch4.adb @@ -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 diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads index 706007b8dd0..55ed10bc4bb 100644 --- a/gcc/ada/sinfo.ads +++ b/gcc/ada/sinfo.ads @@ -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. -- 2.30.2