aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Quinot <quinot@adacore.com>2009-07-10 13:12:10 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2009-07-10 15:12:10 +0200
commit2be0bff8f1836abfa08d9b52c8372f7b03468777 (patch)
treedf8586f79822a2ca08ed10f32d72377b0bfa0cd2
parent9304142e10e1d694d07b6fde8118a69e06fa7e56 (diff)
downloadgcc-2be0bff8f1836abfa08d9b52c8372f7b03468777.zip
gcc-2be0bff8f1836abfa08d9b52c8372f7b03468777.tar.gz
gcc-2be0bff8f1836abfa08d9b52c8372f7b03468777.tar.bz2
sem_aggr.adb: Minor comments editing
2009-07-10 Thomas Quinot <quinot@adacore.com> * sem_aggr.adb: Minor comments editing * exp_tss.adb, exp_ch3.adb: Minor reformatting From-SVN: r149473
-rw-r--r--gcc/ada/ChangeLog6
-rw-r--r--gcc/ada/exp_ch3.adb33
-rw-r--r--gcc/ada/exp_tss.adb13
-rw-r--r--gcc/ada/sem_aggr.adb8
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 <quinot@adacore.com>
+
+ * sem_aggr.adb: Minor comments editing
+
+ * exp_tss.adb, exp_ch3.adb: Minor reformatting
+
2009-07-10 Robert Dewar <dewar@adacore.com>
* 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