From: Gary Dismukes Date: Thu, 12 Dec 2019 10:02:09 +0000 (+0000) Subject: [Ada] Fix a number of typos, plus minor reformatting X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e16c6cc3319d1ee613a9c53b86d2e7addd07b13c;p=gcc.git [Ada] Fix a number of typos, plus minor reformatting 2019-12-12 Gary Dismukes gcc/ada/ * sem_ch3.adb, sem_util.adb: Minor reformatting. From-SVN: r279283 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 57df9a2a3aa..3d0ede43d9d 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,7 @@ +2019-12-12 Gary Dismukes + + * sem_ch3.adb, sem_util.adb: Minor reformatting. + 2019-12-12 Bob Duff * doc/gnat_ugn/gnat_utility_programs.rst: Update gnatmetric diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index bcee77978ac..c3b8796fa08 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 5d5c52014b8..22ecf2137e6 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));