sem_ch3.adb (Build_Derived_Record_Type): Remove the propagation of all attributes related to pragma...
2014-10-17 Hristian Kirtchev <kirtchev@adacore.com> * sem_ch3.adb (Build_Derived_Record_Type): Remove the propagation of all attributes related to pragma Default_Initial_Condition. (Build_Derived_Type): Propagation of all attributes related to pragma Default_Initial_Condition. (Process_Full_View): Account for the case where the full view derives from another private type and propagate the attributes related to pragma Default_Initial_Condition to the private view. (Propagate_Default_Init_Cond_Attributes): New routine. * sem_util.adb: Alphabetize various routines. (Build_Default_Init_Cond_Call): Use an unchecked type conversion when calling the default initial condition procedure of a private type. (Build_Default_Init_Cond_Procedure_Declaration): Prevent the generation of multiple default initial condition procedures. From-SVN: r216370
This commit is contained in:
parent
2211a35ffa
commit
38d0d6c854
@ -1,3 +1,19 @@
|
||||
2014-10-17 Hristian Kirtchev <kirtchev@adacore.com>
|
||||
|
||||
* sem_ch3.adb (Build_Derived_Record_Type): Remove the propagation
|
||||
of all attributes related to pragma Default_Initial_Condition.
|
||||
(Build_Derived_Type): Propagation of all attributes related
|
||||
to pragma Default_Initial_Condition.
|
||||
(Process_Full_View): Account for the case where the full view derives
|
||||
from another private type and propagate the attributes related
|
||||
to pragma Default_Initial_Condition to the private view.
|
||||
(Propagate_Default_Init_Cond_Attributes): New routine.
|
||||
* sem_util.adb: Alphabetize various routines.
|
||||
(Build_Default_Init_Cond_Call): Use an unchecked type conversion
|
||||
when calling the default initial condition procedure of a private type.
|
||||
(Build_Default_Init_Cond_Procedure_Declaration): Prevent
|
||||
the generation of multiple default initial condition procedures.
|
||||
|
||||
2014-10-17 Robert Dewar <dewar@adacore.com>
|
||||
|
||||
* prj-conf.adb: Revert previous change.
|
||||
|
1145
gcc/ada/sem_ch3.adb
1145
gcc/ada/sem_ch3.adb
File diff suppressed because it is too large
Load Diff
@ -1247,7 +1247,7 @@ package body Sem_Util is
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name => New_Occurrence_Of (Proc_Id, Loc),
|
||||
Parameter_Associations => New_List (
|
||||
Make_Type_Conversion (Loc,
|
||||
Make_Unchecked_Type_Conversion (Loc,
|
||||
Subtype_Mark => New_Occurrence_Of (Formal_Typ, Loc),
|
||||
Expression => New_Occurrence_Of (Obj_Id, Loc))));
|
||||
end Build_Default_Init_Cond_Call;
|
||||
@ -1442,6 +1442,13 @@ package body Sem_Util is
|
||||
pragma Assert (Has_Default_Init_Cond (Typ));
|
||||
pragma Assert (Present (Prag));
|
||||
|
||||
-- Nothing to do if the default initial condition procedure was already
|
||||
-- built.
|
||||
|
||||
if Present (Default_Init_Cond_Procedure (Typ)) then
|
||||
return;
|
||||
end if;
|
||||
|
||||
Proc_Id :=
|
||||
Make_Defining_Identifier (Loc,
|
||||
Chars => New_External_Name (Chars (Typ), "Default_Init_Cond"));
|
||||
|
Loading…
Reference in New Issue
Block a user