CVS difference for ais/ai-00169.txt

Differences between 1.1 and version 1.2
Log of other versions for file ais/ai-00169.txt

--- ais/ai-00169.txt	1998/09/30 00:17:31	1.1
+++ ais/ai-00169.txt	1999/03/22 18:22:05	1.2
@@ -1,24 +1,113 @@
-!standard 07.06.01 (14)                               96-11-16  AI95-00169/00
+!standard 07.06.01 (14)                               96-03-21  AI95-00169/01
 !class binding interpretation 96-11-16
+!status work item 99-03-21
 !status received 96-11-16
 !priority Low
 !difficulty Easy
 !subject Exceptions raised by Adjust/Finalize -- Missing case
 
-!summary 96-11-16
+!summary 99-03-21
 
-
-!question 96-11-16
-
-
-!recommendation 96-11-16
-
-
-!wording 96-11-16
-
-
-!discussion 96-11-16
-
+If a call to Finalize propagates an exception when invoked as part of
+the finalization of a master, Program_Error is raised at the point where
+normal execution would have continued following the master's finalization.
+Any other finalizations due to be performed up to that point are performed
+before raising Program_Error.
+
+If a call to Finalize propagates an exception in the case of finalizing an
+anonymous object created for a function call or aggregate, Program_Error
+is raised at the point where normal execution would have continued
+following the object's finalization.
+
+For finalizations of objects that occur as the result of transfers of
+control or the raising of an exception, the finalization of an anonymous
+object should occur as part of the finalizations due to be performed
+for the innermost enclosing master of the anonymous object.
+
+For an explicit call to Adjust or Finalize that propagates an exception,
+the exception is propagated as for a normal call to a user-defined
+subprogram that propagates an exception.
+
+!question 99-03-21
+
+7.6.1(14-20) lists a variety of situations in which Finalize and Adjust
+may raise exceptions, and the possible consequences.
+
+It does not seem to indicate what happens when an exception is raised in
+a Finalize which is part of the finalization of a master due to the most
+normal type of completion--reaching the end of the execution.  What is
+the intended semantics for this situation? [Any pending finalizations
+are performed and Program_Error is raised.]
+
+If the finalization of an anonymous object raises an exception what
+should occur? [Program_Error is raised at the point of finalization.]
+
+If a transfer of control or raising of an exception occurs prior to
+performing a finalization of an anonymous object, when is the object
+finalized? [The anonymous object is finalized as part of the finalization
+of the innermost enclosing master.]
+
+If an explicit call to Adjust or Finalize propagates an exception,
+is the exception converted to Program_Error? [No.]
+
+!recommendation 99-03-21
+
+See summary.
+
+!wording 99-03-21
+
+Add a paragraph to describe the treatment of calls to Finalize that
+propagate an exception when called as part of normal finalization
+of a master, namely to complete any other finalizations due to be
+performed, and raise Program_Error at the point where normal execution
+would have continued following finalization of the master (similar
+to the description of 7.6.1(18)).
+
+Add a paragraph to indicate the effect of Finalize propagating an
+exception when invoked for an anonymous object, namely to raise
+Program_Error immediately following the point where the finalization
+is invoked.
+
+Clarify what should happen for the finalization of anonymous objects
+in the presence of transfers of control or raising of exceptions
+that lead to the finalization of objects in a containing master.
+Any anonymous objects that have not yet been finalized should be
+finalized as part of the finalization of their innermost enclosing
+master (i.e., as part of the "finalizations due to be performed"
+mentioned in 7.6.1(18-19)).
+
+In 7.6.1(14), clarify that the rules for bounded errors on calls to
+Finalize or Adjust do not apply to explicit calls to those operations.
+
+!discussion 99-03-21
+
+The lack of a rule describing what happens when a call to Finalize
+propagates an exception during the finalization of a master is
+an oversight.  The intended semantics is to treat this case
+similarly to what happens when Finalize propagates an exception
+when invoked by the transfer of control of a return statement
+(as defined by 7.6.1(18)).  Any finalizations due to be performed
+are carried out and Program_Error is raised at the point where
+normal execution would have continued.
+
+There is also no mention of what should happen when a call to Finalize
+propagates an exception when finalizing an anonymous object.  Since
+such objects are not directly associated with a master, the rules
+of 7.6.1(14-20) don't appear to explain what should happen.  The
+intended semantics is to raise Program_Error as in the case of other
+implicit calls to Finalize.  The exception should be raised immediately
+following the point where the Finalize operation is invoked (as defined
+by 7.6.1(13)).  Also, in the presence of transfers of control or the
+raising of an exception, the finalization of anonymous objects should
+occur as part of the "finalizations due to be performed" mentioned
+in the rules of 7.6.1(18-19).
+
+In the case of explicitly invoked Adjust and Finalize operations,
+any exception propagated by such calls should simply be propagated
+as for an exception propagation that occurs as part of a call to
+any other user-defined subprogram.  There is no benefit to complicating
+implementations by requiring such exception to be converted to
+Program_Error.
 
 !appendix 96-11-16
 

Questions? Ask the ACAA Technical Agent