CVS difference for ais/ai-00197.txt

Differences between 1.6 and version 1.7
Log of other versions for file ais/ai-00197.txt

--- ais/ai-00197.txt	1999/10/08 23:41:06	1.6
+++ ais/ai-00197.txt	1999/11/19 00:43:44	1.7
@@ -1,43 +1,24 @@
-!standard 07.06    (21)                               99-07-27  AI95-00197/03
+!standard 07.06    (21)                               99-11-18  AI95-00197/04
 !class binding interpretation 98-10-02
+!status deleted 99-11-18
 !status ARG approved   7-0-0  98-10-08
 !status work item 98-10-02
 !status received 98-03-27
 !priority Medium
 !difficulty Medium
 !reference AI-00083
-!subject Aggregate initialization of controlled subcomponents
+!subject (Deleted)
 
 !summary
 
-When an object of a controlled type is created and initialized with
-an aggregate, whether explicitly as part of an object declaration
-or allocator, or implicitly as part of the default initialization
-of some containing object, the implementation must not create a
-separate anonymous object for the aggregate.  It must create the
-value of the aggregate directly in the newly created object.  There
-is no assignment from the anonymous object to the newly created object,
-so the Finalize and Adjust that would be done for that assignment are
-not done.
+This AI has been merged into AI95-00083.
 
 !question
 
-AI-83 imposes a requirement that in the case of a controlled object
-explicitly initialized by an aggregate, implementations must initialize
-the object in place, without using a separate temporary.  Should this
-requirement also apply to default-initialized objects that have
-controlled subcomponents that are initialized by an aggregate? (Yes.)
-
 !recommendation
 
-(See summary.)
-
 !wording
 
-(See summary.)
-
-(Note: Corrigendum wording for this AI is included in AI-00083.)
-
 !discussion
 
 AI-83 discusses the cases of using an aggregate to initialize controlled
@@ -56,81 +37,5 @@
 
 !ACATS test
 
-See AI-00083 for testing of this ruling.
-
 !appendix
 
-!section 7.6(21)
-!subject Aggregates of a controlled type
-!section 7.6
-!reference AI95-00083/02
-!reference RM95-7.6(21)
-!from Gary Dismukes 97-07-11
-!reference 1997-15794.a Gary Dismukes 1997-11-8>>
-!discussion
-
-AI-83 requires that a controlled object initialized by an
-aggregate be built in place, without the use of the canonical
-temporary object.  It seems that this requirement should also
-exist for cases involving controlled components with default
-initialization given by an aggregate, but it's not clear from
-the wording of the AI whether it's intended to apply to such
-cases.
-
-For example, building on the example in the AI:
-
-    type Dyn_String is private;
-    Null_String : constant Dyn_String;
- ...
- private
-    type Dyn_String is new Ada.Finalization.Controlled
-      with record
-        ...
-      end record;
-    procedure Finalize(X : in out Dyn_String);
-    procedure Adjust(X : in out Dyn_String);
-
-    type Rec_with_String is
-      record
-        Str : Dyn_String := (Ada.Finalization.Controlled with ...);
-      end record;
-
-    RS : Rec_with_String;
-
-Is it intended that the component RS.Str be initialized in place,
-without the use of a separate temporary object to hold the value
-of the aggregate?  The fact that the summary says "explicitly
-initialized" makes it unclear to me whether the AI is intended
-to apply to this case (although the end of the !recommendation
-does state that the interpretation applies to all object creations).
-The question is whether the component's default initialization
-is properly considered to be an "explicit initialization" for
-purposes of this AI.
-
-****************************************************************
-
-From: Randy Brukardt
-Sent: October 7, 1999
-
-At the recent ARG meeting, the WG9 concerns with this AI were discussed.
-The following example was given:
-
-   type T is new TP with ...
-   X : T := T'(TP with ...);
-
-If TP is controlled, then TP initialize gets called, but the finalize is T.
-
-After discussion, it was determined that is in fact the expected behavior in
-Ada 95, and indeed this AI doesn't change that fact. There are three ways to
-create a controlled object in Ada 95: via Initialize (a default-initialized
-object); Adjust (an explicitly initialized object); and via an aggregate
-(for which neither Initialize nor Adjust is called).
-
-It was pointed out that it is important that an overridding Finalize (for
-instance) call the Finalize routine of its parent. If T's Finalize calls
-TP Finalize in the above example, there probably aren't any problems.
-
-Tucker volunteered to write an LSN document describing the Ada 95 controlled
-type model, including the various surprises which are possible.
-
-****************************************************************

Questions? Ask the ACAA Technical Agent