CVS difference for ai05s/ai05-0151-1.txt
--- ai05s/ai05-0151-1.txt 2009/11/04 01:27:15 1.4
+++ ai05s/ai05-0151-1.txt 2009/12/12 03:29:34 1.5
@@ -1,6 +1,12 @@
-!standard 3.10.1(5/2) 09-11-03 AI05-0151-1/04
+!standard 3.10.1(8/2) 09-12-11 AI05-0151-1/05
+!standard 3.10.1(8.2/2)
+!standard 3.10.1(9.1/2)
+!standard 3.10.1(9.2/2)
+!standard 3.10.1(9.3/2)
!standard 3.10.1(10/2)
+!standard 3.10.1(13/2)
!class Amendment 09-04-29
+!status ARG Approved 11-0-0 09-11-08
!status work item 09-04-29
!status received 09-04-29
!priority High
@@ -34,7 +40,7 @@
comes from a limited view of a package, rather than from an incomplete
type declaration. For non-tagged incomplete types, they will not be
permitted in calls or in a body. If the parameter or result type was
-incomplete at the point of declaration, any call or the body must be
+incomplete at the point of declaration, all calls or the body must be
within the scope of a *non* limited view of the package defining the
type.
@@ -53,11 +59,11 @@
subtype_declaration; the subtype_indication shall not have a
null_exclusion or a constraint;
- * as the subtype_mark in an access_definition.
+ * as the subtype_mark in an access_definition{;}[.]
{* as the subtype_mark defining the subtype of a parameter or result
- in a profile occurring within a basic_declaration;
- AARM Note: As opposed to in the profile for a body.}
+ in a profile occurring within a basic_declaration.
+ AARM Ramification: But not in the profile for a body.}
If such a name denotes a tagged incomplete view, it may also be used:
@@ -85,6 +91,8 @@
immediately within the private part of a package, then] the completion of
the incomplete view [shall also occur immediately within the private
part; it shall not be deferred to the package body].
+ {AARM Ramification: In this case, the incomplete type cannot be deferred
+ to the package body, even if the declaration occurs in the private part.}
No other uses of a name that denotes an incomplete view of a type are
allowed.
@@ -93,11 +101,13 @@
{An actual parameter in a call shall not be of an untagged incomplete
view. The result object of a function call shall not be of an
incomplete view.
-
- A name that denotes an object of an incomplete view is defined to be
- of a limited type. [Redundant: Hence, the target of an assignment
- statement shall not be of an incomplete view.]}
+Add after 3.10.1(13) (this is a new note):
+
+ A name that denotes an object of an incomplete view is defined
+ to be of a limited type. Hence, the target of an assignment
+ statement shall not be of an incomplete view.
+
!discussion
This proposal originally focused on a concern that a "limited with"
@@ -151,9 +161,78 @@
!example
---!corrigendum 3.10.1(2/2)
+!corrigendum 3.10.1(8/2)
+@drepl
+@xbullet<as the @fa<subtype_mark> in an @fa<access_definition>.>
+@dby
+@xbullet<as the @fa<subtype_mark> in an @fa<access_definition>;>
+
+@xbullet<as the @fa<subtype_mark> defining the subtype of a parameter
+or result in a profile occurring within a @fa<basic_declaration>.>
+!corrigendum 3.10.1(8.2/2)
+
+@drepl
+@xbullet<as the @fa<subtype_mark> defining the subtype of a parameter in a
+@fa<formal_part>;>
+@dby
+@xbullet<as the @fa<subtype_mark> defining the subtype of a parameter in
+the profile for a @fa<subprogram_body>, @fa<entry_body>, or
+@fa<accept_statement>;>
+
+!corrigendum 3.10.1(9.1/2)
+
+@ddel
+If such a name occurs within the declaration list containing the
+completion of the incomplete view, it may also be used:
+
+!corrigendum 3.10.1(9.2/2)
+
+@ddel
+@xbullet<as the @fa<subtype_mark> defining the subtype of a parameter or result
+of an @fa<access_to_subprogram_definition> or an @fa<access_definition> for an
+access-to-subprogram type.>
+
+!corrigendum 3.10.1(9.3/2)
+
+@drepl
+If any of the above uses occurs as part of the declaration of a primitive
+subprogram of the incomplete view, and the declaration occurs immediately within
+the private part of a package, then the completion of the incomplete view shall
+also occur immediately within the private part; it shall not be deferred to the
+package body.
+@dby
+If any of the above uses occurs as part of the declaration of a
+primitive subprogram of the incomplete view, {or as part of an
+@fa<access_to_subprogram_definition> or an @fa<access_definition> for an
+access-to-subprogram type, then the primitive subprogram declaration
+or the access-to-subprogram type definition shall occur within the
+declaration list immediately containing} the completion of
+the incomplete view.
+
+!corrigendum 3.10.1(10/2)
+
+@drepl
+A @fa<prefix> that denotes an object shall not be of an incomplete view.
+@dby
+A @fa<prefix> that denotes an object shall not be of an incomplete view.
+An actual parameter in a call shall not be of an untagged incomplete
+view. The result object of a function call shall not be of an
+incomplete view.
+
+!corrignedum 3.10.1(13/2)
+
+@dinsa
+@xindent<@s9<85 Within a @fa<declarative_part>, an @fa<incomplete_type_declaration>
+and a corresponding @fa<full_type_declaration> cannot be separated by an intervening
+body. This is because a type has to be completely defined before it is frozen, and
+a body freezes all types declared prior to it in the same @fa<declarative_part> (see 13.14).>
+@dinst
+@xindent<@s9<86 A @fa<name> that denotes an object of an incomplete view
+is defined to be of a limited type. Hence, the target of an assignment
+statement shall not be of an incomplete view.>>
+
!ACATS test
Add ACATS tests for this new feature.
@@ -521,6 +600,26 @@
call.
[This is version /04 of the AI - ED.]
+
+****************************************************************
+
+From: Randy Brukardt
+Sent: Friday, December 11, 2009 8:31 PM
+
+The wording of this AI has:
+
+[Redundant: A name that denotes an object of an incomplete view is defined to be
+of a limited type. Hence, the target of an assignment statement shall not be of
+an incomplete view.]
+
+as a new inserted paragraph. This seems unnecessary to me (esp. in normative wording),
+given that two other places mention that incomplete views are limited (3.10.1(2.1/2)
+and the newly inserted 7.6(6.1/3) (from AI05-178, which I coincidentally just read -
+it also was approved in St. Pete)). Any Ada reader that needs to be told what "limited"
+means is rather behind the curve. :-)
+
+So I suggest that this paragraph either be made into a user note (and inserted after
+3.10.1(13)) or dropped altogether. Any preference which?
****************************************************************
Questions? Ask the ACAA Technical Agent