CVS difference for ai05s/ai05-0053-1.txt
--- ai05s/ai05-0053-1.txt 2007/10/31 02:24:49 1.2
+++ ai05s/ai05-0053-1.txt 2008/01/18 07:45:24 1.3
@@ -1,4 +1,5 @@
-!standard 6.5(2.1/2) 07-10-30 AI05-0053-1/02
+!standard 3.10(9/2) 08-01-18 AI05-0053-1/03
+!standard 6.5(2.1/2)
!class binding interpretation 07-05-15
!status work item 07-05-15
!status received 07-05-07
@@ -9,7 +10,7 @@
!summary
-Ban aliased return objects.
+Ban aliased return objects (except for explicitly limited types).
!question
@@ -22,12 +23,23 @@
!recommendation
-Ban aliased return objects.
+Ban aliased return objects (except for explicitly limited types).
!wording
-In 6.5(2.1) (syntax for extended_return_statement), delete "[aliased]".
+In 3.10(9/2), replace
+ The current instance of a limited tagged type, a protected type,
+ a task type, or a type that has the reserved word *limited* in its
+ full definition is also defined to be aliased.
+with
+ In the case of a limited tagged type, a protected type,
+ a task type, or an explicitly limited record type, the
+ current instance of the type is defined to be aliased, as is
+ any return object of such a type that is declared via an
+ extended_return_statement (see 6.5).
+In 6.5(2.1) (syntax for extended_return_statement), delete "[aliased]".
+
!discussion
Consider the case where an extended return statement
@@ -127,6 +139,21 @@
objects are aliased, and that list was never updated to include
return objects.
+After general agreement that defining an extended return object to
+be aliased in the same cases where the current instance of a type
+is aliased would be useful and would pose no implementation
+difficulties, it has been decided to update 3.10(9/2) accordingly.
+
+A little bit of rewording is then needed in order to avoid
+privacy-breaking. This was not an issue in the case of
+the current instance of a type because the current instance of
+a type can only be named in a context where the completion of the
+type is visible. With extended return statements, we we don't want
+to look through private types to see if the completion "has the
+reserved word *limited*". The rule is therefore expressed in terms
+of "an explicitly limited record type" instead.
+
+
We could have instead explicitly stated the Unchecked_Access
"clarification" described above and added a runtime check which
raises Program_Error when X'Access is evaluated during the execution
@@ -156,6 +183,32 @@
These complications tell us that aliased return objects are not worth
the trouble; thus we selected the simple solution.
+
+!corrigendum 3.10(9/2)
+
+@drepl
+A view of an object is defined to be @i<aliased> if it is defined by an
+@fa<object_declaration> or @fa<component_definition> with the reserved word
+@b<aliased>, or by a renaming of an aliased view. In addition, the dereference
+of an access-to-object value denotes an aliased view, as does a view conversion
+(see 4.6) of an aliased view. The current instance of a limited tagged type, a
+protected type, a task type, or a type that has the reserved word @b<limited>
+in its full definition is also defined to be aliased. Finally, a formal
+parameter or generic formal object of a tagged type is defined to be aliased.
+Aliased views are the ones that can be designated by an access value.
+@dby
+A view of an object is defined to be @i<aliased> if it is defined by an
+@fa<object_declaration> or @fa<component_definition> with the reserved word
+@b<aliased>, or by a renaming of an aliased view. In addition, the dereference
+of an access-to-object value denotes an aliased view, as does a view conversion
+(see 4.6) of an aliased view. The current instance of a limited tagged type, a
+protected type, a task type, or an explicitly limited record type, the
+current instance of the type is defined to be aliased, as is any return object
+of such a type that is declared via an @fa<extended_return_statement> (see 6.5).
+Finally, a formal parameter or generic formal object of a tagged type is
+defined to be aliased. Aliased views are the ones that can be designated by
+an access value.
+
!corrigendum 6.5(2.1/2)
Questions? Ask the ACAA Technical Agent