CVS difference for ai05s/ai05-0019-1.txt
--- ai05s/ai05-0019-1.txt 2007/04/05 01:49:14 1.6
+++ ai05s/ai05-0019-1.txt 2007/07/26 02:58:05 1.7
@@ -1,5 +1,11 @@
-!standard 13.14(15.1/2) 07-04-04 AI05-0019-1/02
+!standard 13.14(2) 07-06-15 AI05-0019-1/03
+!standard 13.14(3/1)
+!standard 13.14(8.1/1)
+!standard 13.14(10)
+!standard 13.14(14)
+!standard 13.14(15.1/2)
!class binding interpretation 06-11-10
+!status ARG Approved 7-0-3 07-06-03
!status work item 06-11-10
!status received 06-11-09
!priority High
@@ -60,8 +66,6 @@
it, except for incomplete types. A noninstance body other than a renames-as-body causes
freezing of each entity {and profile} declared before it within the same declarative_part.
-[Author's note: Darn! The same paragraph is touched by another AI.]
-
Change 13.14(8.1/1) as follows:
An implicit call freezes the same entities {and profiles} that would be frozen by an
@@ -99,8 +103,8 @@
of the type are frozen. {At the place where a type is frozen, any subprogram named
in an attribute_definition_clause for the type is frozen.}
-AARM Note: This is the rule that makes it possible to check 13.3(6) without going
-through hoops.
+AARM Note: The second sentence is the rule that makes it possible to check 13.3(6)
+without going through hoops.
!discussion
@@ -111,11 +115,11 @@
type T2 is tagged private;
type Parent is tagged null record;
- procedure Primitive (X : T1'Class; Y : T2; Z : Parent);
+ procedure Primitive (X : T1'Class; Y : T2'Class; Z : Parent);
private
- type T1 is new Parent tagged null record; -- Freeze Parent here.
- type T2 is with null record;
+ type T1 is new Parent with null record; -- Freeze Parent here.
+ type T2 is tagged null record;
end P;
Some rule is needed to avoid problems with the convention of inherited
@@ -129,21 +133,7 @@
OTOH, the level of incompatibility incurred was unanticipated by AI95-00341.
Thus, some adjustment to the rule is needed.
-We already allow incomplete tagged views to be parameters to subprograms. Such
-a view has about the same amount of information that an unfrozen tagged type would,
-and compilers already need to know how to handle them. Thus, exempting them
-from freezing should not have any effect on compilers.
-
-The tagged type should be frozen before any dispatching call needs to be generated
-(non-dispatching calls are not a problem, as tagged types are by-reference; but
-dispatching calls need to know the location of the tag, presumably determined
-when the type is frozen).
-
-This rule change will not eliminate all incompatibilities with this rule, just the
-worst cases. Non-tagged parameters and all function return types will continue
-to be frozen, possibly requiring some reorganization of the code.
-
Another problem that came up in the discussion is this: 13.3(6) says that a subprogram
used in an attribute_definition_clause must have convention Ada. This is nasty
because the subprogram may only be frozen *after* the type to which the
@@ -187,6 +177,86 @@
freezes T2, which freezes the *subprogram* Primitive, but not its *profile*. Therefore,
T1 is *not* frozen (yet), and the source code is legal. T1 (and the profile of
Primitive) will only be frozen at the end of the compilation unit.
+
+!corrigendum 13.14(2)
+
+@dinsa
+The @i<freezing> of an entity occurs at one or more places (@i<freezing points>) in
+the program text where the representation for the entity has to be fully determined.
+Each entity is frozen from its first freezing point to the end of the program text
+(given the ordering of compilation units defined in 10.1.4).
+@dinst
+This clause also defines a place in the program text where the profile of each declared
+callable entity becomes @i<frozen>. A use of a callable entity causes freezing of its
+profile in some contexts, as described below. At the place where the profile of a
+callable entity becomes frozen, the entity itself becomes frozen.
+
+!corrigendum 13.14(3/1)
+
+@drepl
+The end of a @fa<declarative_part>, @fa<protected_body>, or a declaration of a library package
+or generic library package, causes freezing of each entity declared within
+it, except for incomplete types. A noninstance body other than a renames-as-body causes
+freezing of each entity declared before it within the same @fa<declarative_part>.
+@dby
+The end of a @fa<declarative_part>, @fa<protected_body>, or a declaration of a library package
+or generic library package, causes freezing of each entity and profile declared within
+it, except for incomplete types. A noninstance body other than a renames-as-body causes
+freezing of each entity and profile declared before it within the same @fa<declarative_part>.
+
+!corrigendum 13.14(8.1/1)
+
+@drepl
+An implicit call freezes the same entities that would be frozen by an
+explicit call. This is true even if the implicit call is removed via implementation
+permissions.
+@dby
+An implicit call freezes the same entities and profiles that would be frozen by an
+explicit call. This is true even if the implicit call is removed via implementation
+permissions.
+
+!corrigendum 13.14(10)
+
+@dinsa
+@xbullet<At the place where an expression causes freezing, the type of the expression
+is frozen, unless the expression is an enumeration literal used as a @fa<discrete_choice>
+of the @fa<array_aggregate> of an @fa<enumeration_representation_clause>.>
+@dinss
+@xbullet<At the place where a function call causes freezing, the profile of the function is
+frozen. Furthermore, if a parameter of the call is defaulted, the
+@fa<default_expression> for that parameter causes freezing.>
+
+AARM Note: This is the important rule: a call freezes the profile. Note that we don't
+need to consider procedure or entry calls, because the end of a declarative_part freezes
+everything. We are moving here the part about defaulted parameters in function calls:
+it used to be in 13.14(14), but that paragraph is now only concerned with profiles, not calls.
+
+@xbullet<At the place where a @fa<generic_instantiation> causes freezing of a callable entity,
+the profile of that entity is frozen.>
+
+!corrigendum 13.14(14)
+
+@drepl
+At the place where a callable entity is frozen, each subtype of its
+profile is frozen. If the callable entity is a member of an entry family,
+the index subtype of the family is frozen. At the place where a function call causes
+freezing, if a parameter of the call is defaulted, the @fa<default_expression> for that
+parameter causes freezing.
+@dby
+At the place where a profile is frozen, each subtype of the
+profile is frozen. If the corresponding callable entity is a member of an entry family,
+the index subtype of the family is frozen.
+
+!corrigendum 13.14(15.1/2)
+
+@drepl
+At the place where a specific tagged type is frozen, the primitive subprograms
+of the type are frozen.
+@dby
+At the place where a specific tagged type is frozen, the primitive subprograms
+of the type are frozen. At the place where a type is frozen, any subprogram named
+in an @fa<attribute_definition_clause> for the type is frozen.
+
!ACATS test
Questions? Ask the ACAA Technical Agent