CVS difference for ai12s/ai12-0140-1.txt

Differences between 1.10 and version 1.11
Log of other versions for file ai12s/ai12-0140-1.txt

--- ai12s/ai12-0140-1.txt	2016/06/08 02:16:07	1.10
+++ ai12s/ai12-0140-1.txt	2016/08/05 07:02:15	1.11
@@ -1,6 +1,8 @@
-!standard 3.4(7/3)                                 16-06-04  AI12-0140-1/03
+!standard 3.4(7/3)                                 16-08-01  AI12-0140-1/04
 !standard 7.3.1(5/1)
 !class binding interpretation 14-10-13
+!status Amendment 1-2012 16-08-01
+!status ARG Approved 9-0-2  16-06-11
 !status work item 14-10-13
 !status received 14-07-10
 !priority Low
@@ -33,16 +35,18 @@
 -- end of example code
 
 Janus/Ada gives me an error:
-In File C:\work\unconstrained-constrained\unc.ads at line 10
+In File C:\work\undiscriminated-discriminated\unc.ads at line 10
 --------------
     9:     procedure Free is new
    10:       Ada.Unchecked_Deallocation (My_String, My_String_Access);
 ----------------------------------------------------^
-*ERROR* Formal and actual must both be constrained or unconstrained
+*ERROR* Formal and actual must both be discriminated or undiscriminated
 (6.4.10) [RM 12.5.4(3)]
 
-The full view of My_String is constrained, while My_String_Access designates
-the partial view of My_String, which is unconstrained.
+The full view of My_String has no discriminant constraint, while
+My_String_Access designates the partial view of My_String, which has an
+unknown discriminant constraint. It's not clear that these statically
+match, as is required by 12.5.4(3).
 
 The question is: Is the example code legal? (Yes.)
 
@@ -89,23 +93,11 @@
 
 Add after 7.3.1(5/1):
 
-   The characteristics of the designated subtype of an access type
-   follow a somewhat different rule. The view of the designated subtype
-   of (a view of) an access type at a given place is determined by the
-   view of the designated subtype that is visible at that place, rather
-   than the view at the place where the access type is declared, except
-   in the following case:
-
-      * the designated subtype at the place where the access type is
-        declared denotes an incomplete view, and
-
-      * the incomplete view is part of a limited view of a package.
-
-   In this case, the designated subtype of (a view of) the access type
-   retains this incomplete view at all places other than those within
-   the scope of a _nonlimited_with_clause_ for the package in which the
-   (full) type is declared; within such a scope the more general rule
-   applies.
+   The characteristics and constraints of the designated subtype of an access
+   type follow a somewhat different rule. The view of the designated subtype
+   of (a view of) an access type at a given place is determined by the view
+   of the designated subtype that is visible at that place, rather than the
+   view at the place where the access type is declared.
 
 !discussion
 
@@ -114,6 +106,10 @@
 is that most compilers (but apparently not the Janus compiler) already
 implement this interpretation.
 
+Whether the view of a designated subtype is incomplete or complete at a
+particular place is determined by 3.10.1(2.7/3); this new rule has no
+effect on that at all.
+
 Here are some examples:
 
 package UNC2 is
@@ -146,6 +142,22 @@
 Here again, the designated subtype's characteristics are determined by
 the place where the access type is used, rather than where the access
 type is declared.
+
+!corrigendum 7.3.1(5/1)
+
+@dinsa
+For example, an array type whose component type is limited
+private becomes nonlimited if the full view of the component type is
+nonlimited and visible at some later place immediately within the
+declarative region in which the array type is declared. In such a
+case, the predefined "=" operator is implicitly declared at that
+place, and assignment is allowed after that place.
+@dinst
+The characteristics and constraints of the designated subtype of an access
+type follow a somewhat different rule. The view of the designated subtype
+of (a view of) an access type at a given place is determined by the view
+of the designated subtype that is visible at that place, rather than the
+view at the place where the access type is declared.
 
 !ASIS
 

Questions? Ask the ACAA Technical Agent