CVS difference for ai05s/ai05-0029-1.txt

Differences between 1.3 and version 1.4
Log of other versions for file ai05s/ai05-0029-1.txt

--- ai05s/ai05-0029-1.txt	2008/02/05 06:33:09	1.3
+++ ai05s/ai05-0029-1.txt	2008/03/07 06:15:18	1.4
@@ -1,14 +1,19 @@
-!standard 12.5(8)                                       07-04-04    AI05-0029-1/02
+!standard 7.3.1(3/1)                                       08-02-08    AI05-0029-1/03
+!standard 7.3.1(6/1)
+!standard 12.5(8/2)
+!standard 12.5.1(21/2)
 !class binding interpretation 06-11-13
+!status ARG Approved  8-0-1  08-02-08
 !status work item 06-11-13
 !status received 06-06-02
 !priority Medium
 !difficulty Easy
 !qualifier Omission
 !subject Meaning of 12.5(8)
+
 !summary
 
-Some operators and primitive subprograms may not be declared at all but still exist,
+Some operators and primitive subprograms might not be declared at all but still exist,
 and they can be named and called from generic instantiations in some cases.
 
 !question
@@ -58,7 +63,7 @@
 
 !recommendation
 
-(See Summary.)
+(See summary.)
 
 !wording
 
@@ -130,10 +135,10 @@
     package I is new Q.G (C); -- Where is the predefined "=" for C?
 end R;
 
-An "=" is available for the formal type A in the private part of Q.G.  However, no "="
-operator is ever declared for type C, because its component type Q.T is limited.  Still,
-in the instance I the name "=" declares a view of the "=" for C which
-exists-but-is-never-declared.
+An "=" is available for the formal type A in the private part of Q.G. However,
+no "=" operator is ever declared for type C, because its component type Q.T is
+limited. Still, in the instance I the name "=" declares a view of the "=" for
+C which exists-but-is-never-declared.
 
 End of AARM Note.
 
@@ -176,12 +181,114 @@
 derived types). And it requires changes in 7.3.1 to explain that the operators exist
 but are not declared. No normative change is required for derived types in 7.3.1,
 but there is bracketed text that is telling lies, so it seems good to fix it.
+
+!corrigendum 7.3.1(3/1)
+
+@drepl
+For a composite type, the characteristics (see 7.3) of the type are determined
+in part by the characteristics of its component types. At the place where the
+composite type is declared, the only characteristics of component types used
+are those characteristics visible at that place. If later immediately within the
+declarative region in which the composite type is declared additional characteristics
+become visible for a component type, then any corresponding characteristics become
+visible for the composite type. Any additional predefined operators are implicitly
+declared at that place.
+@dby
+For a composite type, the characteristics (see 7.3) of the type are determined
+in part by the characteristics of its component types. At the place where the
+composite type is declared, the only characteristics of component types used
+are those characteristics visible at that place. If later immediately within the
+declarative region in which the composite type is declared additional characteristics
+become visible for a component type, then any corresponding characteristics become
+visible for the composite type. Any additional predefined operators are implicitly
+declared at that place. If there is no such place, then additional predefined
+operators are not declared at all, but they still exist.
+
+!corrigendum 7.3.1(6/1)
 
---!corrigendum A.18.2(239/2)
+@drepl
+Inherited primitive subprograms follow a different rule. For a @fa<derived_type_definition>,
+each inherited primitive subprogram is implicitly declared at the earliest place,
+if any, immediately within the declarative region in which the @fa<type_declaration> occurs,
+but after the @fa<type_declaration>, where the corresponding declaration from the parent is
+visible. If there is no such place, then the inherited subprogram is not declared at
+all. An inherited subprogram that is not declared at all cannot be named in a call and
+cannot be overridden, but for a tagged type, it is possible to dispatch to it.
+@dby
+Inherited primitive subprograms follow a different rule. For a @fa<derived_type_definition>,
+each inherited primitive subprogram is implicitly declared at the earliest place,
+if any, immediately within the declarative region in which the @fa<type_declaration occurs>,
+but after the @fa<type_declaration>, where the corresponding declaration from the parent is
+visible. If there is no such place, then the inherited subprogram is not declared at
+all, but it still exists. For a tagged type, it is possible to dispatch to an 
+inherited subprogram that is not declared at all.
+
+!corrigendum 12.5(8/2)
 
+@drepl
+The formal type also belongs to each category that contains the determined category. The
+primitive subprograms of the type are as for any type in the determined category. For a
+formal type other than a formal derived type, these are the predefined operators of the
+type. For an elementary formal type, the predefined operators are implicitly declared
+immediately after the declaration of the formal type. For a composite formal type, the
+predefined operators are implicitly declared either immediately after the declaration
+of the formal type, or later immediately within the declarative region in which the
+type is declared according to the rules of 7.3.1. In an instance, the copy of such
+an implicit declaration declares a view of the predefined operator of the actual
+type, even if this operator has been overridden for the actual type.
+The rules specific to formal derived types are given in 12.5.1.
+@dby
+The formal type also belongs to each category that contains the determined category. The
+primitive subprograms of the type are as for any type in the determined category. For a
+formal type other than a formal derived type, these are the predefined operators of the
+type. For an elementary formal type, the predefined operators are implicitly declared
+immediately after the declaration of the formal type. For a composite formal type, the
+predefined operators are implicitly declared either immediately after the declaration
+of the formal type, or later immediately within the declarative region in which the
+type is declared according to the rules of 7.3.1. In an instance, the copy of such
+an implicit declaration declares a view of the predefined operator of the actual
+type, even if this operator has been overridden for the actual type or even if it
+is never declared for the actual type. The rules specific to formal derived types
+are given in 12.5.1.
+
+!corrigendum 12.5.1(21/2)
+
+@drepl
+For a formal derived type, the predefined operators and inherited user-defined
+subprograms are determined by the ancestor type and any progenitor types, and
+are implicitly declared at the earliest place, if any, immediately within the
+declarative region in which the formal type is declared, where the corresponding
+primitive subprogram of the ancestor or progenitor is visible (see 7.3.1).
+In an instance, the copy of such an implicit declaration declares a view of the
+corresponding primitive subprogram of the ancestor or progenitor of the formal
+derived type, even if this primitive has been overridden for the actual type.
+When the ancestor or
+progenitor of the formal derived type is itself a formal type, the copy of
+the implicit declaration declares a view of the corresponding copied operation
+of the ancestor or progenitor. In the case of a formal private extension, however,
+the tag of the formal type is that of the actual type, so if the tag in a call
+is statically determined to be that of the formal type, the body executed will
+be that corresponding to the actual type.
+@dby
+For a formal derived type, the predefined operators and inherited user-defined
+subprograms are determined by the ancestor type and any progenitor types, and
+are implicitly declared at the earliest place, if any, immediately within the
+declarative region in which the formal type is declared, where the corresponding
+primitive subprogram of the ancestor or progenitor is visible (see 7.3.1).
+In an instance, the copy of such an implicit declaration declares a view of the
+corresponding primitive subprogram of the ancestor or progenitor of the formal
+derived type, even if this primitive has been overridden for the actual type
+or even if it is never declared for the actual type. When the ancestor or
+progenitor of the formal derived type is itself a formal type, the copy of
+the implicit declaration declares a view of the corresponding copied operation
+of the ancestor or progenitor. In the case of a formal private extension, however,
+the tag of the formal type is that of the actual type, so if the tag in a call
+is statically determined to be that of the formal type, the body executed will
+be that corresponding to the actual type.
 
 !ACATS test
 
+Create an ACATS C-Test like the example in the question.
 
 !appendix
 

Questions? Ask the ACAA Technical Agent