From e7bcf552b5fbf6d331a9a9f1cff8ecac3ac44c8b Mon Sep 17 00:00:00 2001 From: charlet Date: Fri, 10 Jul 2009 13:12:10 +0000 Subject: [PATCH] 2009-07-10 Thomas Quinot * sem_aggr.adb: Minor comments editing * exp_tss.adb, exp_ch3.adb: Minor reformatting git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149473 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/ChangeLog | 6 ++++++ gcc/ada/exp_ch3.adb | 33 +++++++++++++++++---------------- gcc/ada/exp_tss.adb | 13 ++++++------- gcc/ada/sem_aggr.adb | 8 ++++---- 4 files changed, 33 insertions(+), 27 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 32957bc..a089ac4 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2009-07-10 Thomas Quinot + + * sem_aggr.adb: Minor comments editing + + * exp_tss.adb, exp_ch3.adb: Minor reformatting + 2009-07-10 Robert Dewar * exp_util.adb: Minor code reorganization (use N_Short_Circuit) diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb index cb8e41e..d33698d 100644 --- a/gcc/ada/exp_ch3.adb +++ b/gcc/ada/exp_ch3.adb @@ -2622,13 +2622,15 @@ package body Exp_Ch3 is Stmts := Build_Initialization_Call (Loc, - Make_Selected_Component (Loc, - Prefix => Make_Identifier (Loc, Name_uInit), - Selector_Name => New_Occurrence_Of (Id, Loc)), - Typ, - In_Init_Proc => True, - Enclos_Type => Rec_Type, - Discr_Map => Discr_Map, + Id_Ref => + Make_Selected_Component (Loc, + Prefix => + Make_Identifier (Loc, Name_uInit), + Selector_Name => New_Occurrence_Of (Id, Loc)), + Typ => Typ, + In_Init_Proc => True, + Enclos_Type => Rec_Type, + Discr_Map => Discr_Map, Constructor_Ref => Expression (Decl)); else Stmts := Build_Assignment (Id, Expression (Decl)); @@ -2642,13 +2644,14 @@ package body Exp_Ch3 is Stmts := Build_Initialization_Call (Loc, - Make_Selected_Component (Loc, - Prefix => Make_Identifier (Loc, Name_uInit), - Selector_Name => New_Occurrence_Of (Id, Loc)), - Typ, + Id_Ref => + Make_Selected_Component (Loc, + Prefix => Make_Identifier (Loc, Name_uInit), + Selector_Name => New_Occurrence_Of (Id, Loc)), + Typ => Typ, In_Init_Proc => True, - Enclos_Type => Rec_Type, - Discr_Map => Discr_Map); + Enclos_Type => Rec_Type, + Discr_Map => Discr_Map); Clean_Task_Names (Typ, Proc_Id); @@ -5704,9 +5707,7 @@ package body Exp_Ch3 is -- Handle constructors of non-tagged CPP_Class types - if not Is_Tagged_Type (Def_Id) - and then Is_CPP_Class (Def_Id) - then + if not Is_Tagged_Type (Def_Id) and then Is_CPP_Class (Def_Id) then Set_CPP_Constructors (Def_Id); end if; diff --git a/gcc/ada/exp_tss.adb b/gcc/ada/exp_tss.adb index 902d4e7..b1a2851 100644 --- a/gcc/ada/exp_tss.adb +++ b/gcc/ada/exp_tss.adb @@ -212,9 +212,8 @@ package body Exp_Tss is if not Is_CPP_Class (Typ) then return Node (Elmt); - -- In case of CPP classes we are searching here for the - -- default constructor and hence we must skip non-default - -- constructors (if any) + -- For CPP classes, we are looking for the default constructor, + -- and so we must skip any non-default constructor. elsif No (Next @@ -228,13 +227,13 @@ package body Exp_Tss is Next_Elmt (Elmt); end loop; - -- Non-default constructors are currently supported only in the - -- context of interfacing with C++ + -- Non-default constructors are currently supported only in the context + -- of interfacing with C++. else pragma Assert (Is_CPP_Class (Typ)); - -- Use the referenced function to locate the IP procedure that - -- corresponds with the C++ constructor + -- Use the referenced function to locate the init_proc matching + -- the C++ constructor. Elmt := First_Elmt (TSS_Elist (FN)); while Present (Elmt) loop diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb index b160b92..9bff18e 100644 --- a/gcc/ada/sem_aggr.adb +++ b/gcc/ada/sem_aggr.adb @@ -2373,7 +2373,7 @@ package body Sem_Aggr is -- Builds a new N_Component_Association node which associates -- Component to expression Expr and adds it to the association -- list being built, either New_Assoc_List, or the association - -- being build for an inner aggregate. + -- being built for an inner aggregate. function Discr_Present (Discr : Entity_Id) return Boolean; -- If aggregate N is a regular aggregate this routine will return True. @@ -3368,7 +3368,7 @@ package body Sem_Aggr is Assoc_List : List_Id; Comp : Entity_Id); -- Nested components may themselves be discriminated - -- types constrained by outer discriminants. Their + -- types constrained by outer discriminants, whose -- values must be captured before the aggregate is -- expanded into assignments. @@ -3505,7 +3505,7 @@ package body Sem_Aggr is -- have been collected in the aggregate earlier, and -- they may appear as constraints of subcomponents. -- Similarly if this component has discriminants, they - -- might it turn be propagated to their components. + -- might in turn be propagated to their components. if Has_Discriminants (Typ) then Add_Discriminant_Values (Expr, New_Assoc_List); @@ -3524,7 +3524,7 @@ package body Sem_Aggr is begin -- If the type has additional components, create - -- an others box association for them. + -- an OTHERS box association for them. Comp := First_Component (Ctyp); while Present (Comp) loop -- 2.7.4