===================================================================
@@ -2100,15 +2100,6 @@
elsif Is_Ignored_Ghost_Entity (Obj_Id) then
null;
- -- The expansion of iterator loops generates an object
- -- declaration where the Ekind is explicitly set to loop
- -- parameter. This is to ensure that the loop parameter behaves
- -- as a constant from user code point of view. Such object are
- -- never controlled and do not require finalization.
-
- elsif Ekind (Obj_Id) = E_Loop_Parameter then
- null;
-
-- The object is of the form:
-- Obj : [constant] Typ [:= Expr];
===================================================================
@@ -11972,16 +11972,6 @@
elsif Is_Ignored_Ghost_Entity (Obj_Id) then
null;
- -- The expansion of iterator loops generates an object declaration
- -- where the Ekind is explicitly set to loop parameter. This is to
- -- ensure that the loop parameter behaves as a constant from user
- -- code point of view. Such object are never controlled and do not
- -- require cleanup actions. An iterator loop over a container of
- -- controlled objects does not produce such object declarations.
-
- elsif Ekind (Obj_Id) = E_Loop_Parameter then
- return False;
-
-- The object is of the form:
-- Obj : [constant] Typ [:= Expr];
--
===================================================================
@@ -3371,7 +3371,9 @@
function Status_Flag_Or_Transient_Decl (Id : E) return N is
begin
- pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
+ pragma Assert (Ekind_In (Id, E_Constant,
+ E_Loop_Parameter,
+ E_Variable));
return Node15 (Id);
end Status_Flag_Or_Transient_Decl;
@@ -6546,7 +6548,9 @@
procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
begin
- pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
+ pragma Assert (Ekind_In (Id, E_Constant,
+ E_Loop_Parameter,
+ E_Variable));
Set_Node15 (Id, V);
end Set_Status_Flag_Or_Transient_Decl;
@@ -10087,6 +10091,7 @@
Write_Str ("Related_Instance");
when E_Constant
+ | E_Loop_Parameter
| E_Variable
=>
Write_Str ("Status_Flag_Or_Transient_Decl");
===================================================================
@@ -4325,12 +4325,12 @@
-- expression may consist of the above xxxPredicate call on its own.
-- Status_Flag_Or_Transient_Decl (Node15)
+-- Defined in constant, loop, and variable entities. Applies to objects
+-- that require special treatment by the finalization machinery, such as
+-- extended return results, IF and CASE expression results, and objects
+-- inside N_Expression_With_Actions nodes. The attribute contains the
+-- entity of a flag which specifies particular behavior over a region of
+-- code or the declaration of a "hook" object.
-- In which case is it a flag, or a hook object???
-- Storage_Size_Variable (Node26) [implementation base type only]
@@ -5846,7 +5846,7 @@
-- Esize (Uint12)
-- Extra_Accessibility (Node13) (constants only)
-- Alignment (Uint14)
- -- Status_Flag_Or_Transient_Decl (Node15) (constants only)
+ -- Status_Flag_Or_Transient_Decl (Node15)
-- Actual_Subtype (Node17)
-- Renamed_Object (Node18)
-- Size_Check_Code (Node19) (constants only)