CVS difference for ais/ai-00360.txt

Differences between 1.4 and version 1.5
Log of other versions for file ais/ai-00360.txt

--- ais/ai-00360.txt	2003/12/07 05:00:34	1.4
+++ ais/ai-00360.txt	2004/04/06 19:57:16	1.5
@@ -1,6 +1,15 @@
-!standard 07.06(09)                                    03-11-19  AI95-00360/03
+!standard 07.06(09)                                    04-03-25  AI95-00360/04
 !standard D.07(04)
+!standard A.4.5(72)
+!standard A.5.2(15)
+!standard A.5.2(27)
+!standard A.8.1(16)
+!standard A.8.4(19)
+!standard A.10.1(85)
+!standard A.12.1(27)
 !class binding interpretation 03-10-08
+!status Amendment 200Y 04-03-24
+!status ARG Approved 8-0-0  04-03-07
 !status work item 03-10-08
 !status received 03-10-08
 !priority Medium
@@ -11,7 +20,7 @@
 
 Some types are defined to *need finalization*. The restriction
 No_Nested_Finalization is defined in terms of types that need finalization. A
-of language-defined types are defined to need finalization.
+number of language-defined types are defined to need finalization.
 
 !question
 
@@ -35,60 +44,67 @@
 
 o  it is a controlled type, a task type or a protected type; or
 
-o  it has subcomponents that need finalization; or
+o  it has a component that needs finalization; or
 
-o  it has an access discriminant whose designated subtype needs finalization; or
+o  it is a limited type that has an access discriminant whose designated type
+   needs finalization; or
 
 o  it is one of a number of language-defined types that are explicitly defined
    to need finalization.
 
+AARM Note
 
+The fact that a type needs finalization does not require it to be implemented
+with a controlled type. It just has to be recognized by the
+No_Nested_Finalization restriction.
+
 Insert after A.4.5(72):
 
-The type Unbounded_String needs finalization.
+The type Unbounded_String needs finalization (see 7.6).
 
+Insert after A.5.2(15):
 
-Insert after A.8.1(16):
+The type Generator needs finalization (see 7.6).
 
-The type File_Type needs finalization in every instantiation of Sequential_IO.
+Insert after A.5.2(27):
 
+The type Generator needs finalization (see 7.6) in every instantiation of Discrete_Random.
 
-Insert after A.8.4(19):
+Insert after A.8.1(16):
 
-The type File_Type needs finalization in every instantiation of Direct_IO.
+The type File_Type needs finalization (see 7.6) in every instantiation of Sequential_IO.
 
+Insert after A.8.4(19):
 
-Insert after A.10.1(85):
+The type File_Type needs finalization (see 7.6) in every instantiation of Direct_IO.
 
-The type File_Type needs finalization.
+Insert after A.10.1(85):
 
+The type File_Type needs finalization (see 7.6).
 
 Insert after A.12.1(27):
-
-The type File_Type needs finalization.
 
+The type File_Type needs finalization (see 7.6).
 
 Replace D.7(4) by:
 
 No_Nested_Finalization
-
-Objects of a type that needs finalization and access types that designate a type
-that needs finalization shall be declared only at library level.
 
+Objects of a type that needs finalization (see 7.6) and access types that
+designate a type that needs finalization (see 7.6) shall be declared only at
+library level.
 
 Add in the Static Semantics of D.15 (AI 297):
 
-The type Timing_Event needs finalization.
+The type Timing_Event needs finalization (see 7.6).
 
+Add in the Static Semantics of D.14 (AI 307):
 
-Add in the Static Semantics of D.14 (AI 207):
+The type Timer needs finalization (see 7.6).
 
-The type Timer needs finalization.
-
-
 Add in the Static Semantics of AI 354:
 
-The type Group_Timer needs finalization.
+The type Group_Budget needs finalization (see 7.6).
 
 
 !discussion
@@ -113,8 +129,112 @@
 In this example the finalization of X causes the finalization of X.D, which is
 effectively a nested finalization. However, this case is not forbidden by the
 existing wording of D.7(4).
+
+!corrigendum 7.6(09)
 
---!corrigendum
+@dinsa
+A controlled type is a descendant of Controlled or Limited_Controlled. The
+(default) implementations of Initialize, Adjust, and Finalize have no effect.
+The predefined "=" operator of type Controlled always returns True, since this
+operator is incorporated into the implementation of the predefined equality
+operator of types derived from Controlled, as explained in 4.5.2. The type
+Limited_Controlled is like Controlled, except that it is limited and it lacks
+the primitive subprogram Adjust.
+@dinss
+A type is said to @i<need finalization> if:
+@xbullet<it is a controlled type, a task type or a protected type; or>
+@xbullet<it has a component that needs finalization; or>
+@xbullet<it is a limited type that has an access discriminant whose designated
+type needs finalization; or>
+@xbullet<it is one of a number of language-defined types that are explicitly
+defined to need finalization.>
+
+!corrigendum A.4.5(72)
+
+@dinsa
+@xcode<@b<private>
+   ... -- @ft<@i<not specified by the language>>
+@b<end> Ada.Strings.Unbounded;>
+@dinst
+The type Unbounded_String needs finalization (see 7.6).
+
+!corrigendum A.5.2(15)
+
+@dinsa
+@xcode<@b<private>
+   ... -- @ft<@i<not specified by the language>>
+@b<end> Ada.Numerics.Float_Random;>
+@dinst
+The type Generator needs finalization (see 7.6).
+
+!corrigendum A.5.2(27)
+
+@dinsa
+@xcode<@b<private>
+   ... -- @ft<@i<not specified by the language>>
+@b<end> Ada.Numerics.Discrete_Random;>
+@dinst
+The type Generator needs finalization (see 7.6) in every instantiation of
+Discrete_Random.
+
+!corrigendum A.8.1(16)
+
+@dinsa
+@xcode<@b<private>
+   ... -- @ft<@i<not specified by the language>>
+@b<end> Ada.Sequential_IO;>
+@dinst
+The type File_Type needs finalization (see 7.6) in every instantiation of
+Sequential_IO.
+
+!corrigendum A.8.4(19)
+
+@dinsa
+@xcode<@b<private>
+   ... -- @ft<@i<not specified by the language>>
+@b<end> Ada.Direct_IO;>
+@dinst
+The type File_Type needs finalization (see 7.6) in every instantiation of
+Direct_IO.
+
+!corrigendum A.10.1(85)
+
+@dinsa
+@xcode<
+   Status_Error : @b<exception renames> IO_Exceptions.Status_Error;
+   Mode_Error   : @b<exception renames> IO_Exceptions.Mode_Error;
+   Name_Error   : @b<exception renames> IO_Exceptions.Name_Error;
+   Use_Error    : @b<exception renames> IO_Exceptions.Use_Error;
+   Device_Error : @b<exception renames> IO_Exceptions.Device_Error;
+   End_Error    : @b<exception renames> IO_Exceptions.End_Error;
+   Data_Error   : @b<exception renames> IO_Exceptions.Data_Error;
+   Layout_Error : @b<exception renames> IO_Exceptions.Layout_Error;
+@b<private>
+   ... -- @ft<@i<not specified by the language>>
+@b<end> Ada.Text_IO;>
+@dinst
+The type File_Type needs finalization (see 7.6).
+
+!corrigendum A.12.1(27)
+
+@dinsa
+@b<private>
+   ... -- @ft<@i<not specified by the language>>
+@b<end> Ada.Streams.Stream_IO;>
+@dinst
+The type File_Type needs finalization (see 7.6).
+
+!corrigendum D.7(4)
+
+@drepl
+@xhang<@xterm<No_Nested_Finalization>
+Objects with controlled, protected, or task parts and access types that
+designate such objects, shall be declared only at library level.>
+@dby
+@xhang<@xterm<No_Nested_Finalization>
+Objects of a type that needs finalization (see 7.6) and access types that
+designate a type that needs finalization (see 7.6) shall be declared only at
+library level.>
 
 !example
 

Questions? Ask the ACAA Technical Agent