From 3a3af4c32cf7d5f4caf79031da89bc6972cdfbd3 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Fri, 4 Jan 2013 10:08:50 +0100 Subject: [multiple changes] 2013-01-04 Thomas Quinot * sinfo.ads: Minor documentation update. 2013-01-04 Thomas Quinot * sem_ch3.adb, einfo.adb (Analyze_Object_Declaration): Do not set Ekind before resolving initialization expression. 2013-01-04 Hristian Kirtchev * checks.adb (Generate_Index_Checks): Delay the generation of the check for an indexed component where the prefix mentions Loop_Entry until the attribute has been properly expanded. * exp_ch5.adb (Expand_Loop_Entry_Attributes): Perform minor decoration of the constant that captures the value of Loop_Entry's prefix at the entry point into a loop. Generate index checks for an attribute reference that has been transformed into an indexed component. 2013-01-04 Thomas Quinot * exp_prag.adb, exp_util.adb, exp_util.ads, freeze.adb, exp_aggr.adb, sem_ch13.adb (Exp_Aggr.Collect_Initialization_Statements): Nothing to do if Obj is already frozen. (Exp_Util.Find_Init_Call): Rename to... (Exp_Util.Remove_Init_Call): New subprogram, renamed from Find_Init_Call. Remove the initialization call from the enclosing list if found, and if it is from an Initialization_Statements attribute, reset it. (Exp_Util.Append_Freeze_Action): Minor code reorganization. (Exp_Util.Append_Freeze_Actions): Ensure a freeze node has been allocated (as is already done in Append_Freeze_Action). (Freeze.Freeze_Entity): For an object with captured Initialization_Statements and non-delayed freezeing, unwrap the initialization statements and insert and them directly in the enclosing list. (Sem_Ch13.Check_Address_Clause): For an object with Initialization_Statements and an address clause, unwrap the initialization statements when moving them to the freeze actions. From-SVN: r194887 --- gcc/ada/sinfo.ads | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'gcc/ada/sinfo.ads') diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads index d3e7d71..08b09d2 100644 --- a/gcc/ada/sinfo.ads +++ b/gcc/ada/sinfo.ads @@ -7020,15 +7020,10 @@ package Sinfo is -- a subexpression, whose value is the value of the Expression after -- executing all the actions. - -- Note: if the actions contain declarations, then these declarations - -- may be referenced within the expression. It is thus appropriate for - -- the back-end to create a scope that encompasses the construct (any - -- declarations within the actions will definitely not be referenced - -- once elaboration of the construct is completed). - - -- But we rely on freeze nodes appearing in actions being elaborated in - -- the enclosing scope (see Exp_Aggr.Collect_Initialization_ - -- Statements)??? + -- If the actions contain declarations, then these declarations may + -- be referenced within the expression. However note that there is + -- no proper scope associated with the expression-with-action, so the + -- back-end will elaborate them in the context of the enclosing scope. -- Sprint syntax: do -- action; @@ -7046,7 +7041,10 @@ package Sinfo is -- never have created this node if there weren't some actions. -- Note: Expression may be a Null_Statement, in which case the - -- N_Expression_With_Actions has type Standard_Void_Type. + -- N_Expression_With_Actions has type Standard_Void_Type. However some + -- backends do not support such expression-with-actions occurring + -- outside of a proper (non-void) expression, so this should just be + -- used as an intermediate representation within the front-end. -------------------- -- Free Statement -- @@ -7183,7 +7181,7 @@ package Sinfo is -- the exception to be raised (i.e. it is equivalent to a raise -- statement that raises the corresponding exception). This use -- is distinguished by the fact that the Etype in this case is - -- Standard_Void_Type, In the subexpression case, the Etype is the + -- Standard_Void_Type; in the subexpression case, the Etype is the -- same as the type of the subexpression which it replaces. -- If Condition is empty, then the raise is unconditional. If the -- cgit v1.1