CVS difference for ais/ai-00326.txt

Differences between 1.10 and version 1.11
Log of other versions for file ais/ai-00326.txt

--- ais/ai-00326.txt	2004/03/03 00:21:34	1.10
+++ ais/ai-00326.txt	2004/05/29 00:38:38	1.11
@@ -1,4 +1,4 @@
-!standard 03.02      (04)                            04-01-09  AI95-00326/06
+!standard 03.02      (04)                            04-05-25  AI95-00326/07
 !standard 03.02      (05)
 !standard 03.07      (01)
 !standard 03.10.01   (02)
@@ -37,8 +37,8 @@
 reference, there is no implementation difficulty in allowing them to be used as
 parameters even when the full definition of the type is not available. Hence,
 it makes sense to relax the rule for using incomplete types that are known to
-be tagged, to allow them as formal parameters, since from a code generation
-point of view they are essentially equivalent to access parameters.
+be tagged, to allow such types as formal parameters, since from a code
+generation point of view they are essentially equivalent to access parameters.
 
 !proposal
 
@@ -85,13 +85,13 @@
 
   Certain composite types (and [partial] views thereof) have special...
 
-Add to 3.2.1(8) before the last sentence:
+Add to 3.2.1(8) after the first sentence:
 
   A full type defines the full view of a type.
 
 AARM Change: All types have full views in this model. The penultimate sentence
-  of 7.3(4) gets square brackets in the RM (but I'd recommend leaving it there
-  in order to keep the entire private type model intact).
+  of 7.3(4) gets square brackets in the AARM (but I'd recommend leaving it
+  there in order to keep the entire private type model intact).
 
 Modify 3.7(1) to remove the two occurrences of "partial" in the last sentence.
 
@@ -108,7 +108,7 @@
 
 Add a new first sentence:
 
-  If an incomplete_type_declaration includes the keyword TAGGED, then the
+  If an incomplete_type_declaration includes the reserved word tagged, then a
   full_type_declaration that completes it shall declare a tagged type.
 
 Replace 3.10.1(5-9):
@@ -128,7 +128,7 @@
 
     * as the prefix of an attribute_reference whose attribute_designator is
       Class; such an attribute_reference is restricted to the uses allowed
-      above for tagged incomplete views.
+      here; it denotes a tagged incomplete view.
 
   If such a name occurs within the list of declarative_items containing
   the completion of the incomplete view, it may also be used:
@@ -150,10 +150,10 @@
 
 Replace 3.10.1(10):
 
-  The prefix of a name shall not be of an incomplete view.
+  A prefix shall not be of an incomplete view.
 
 AARM: We used to disallow all dereferences of an incomplete type.
-Now we only disallow such dereferences when used as a prefix.  Dereferences
+Now we only disallow such dereferences when used as a prefix. Dereferences
 used in other contexts do not pose a problem since normal type matching
 will preclude their use except when the full type is "nearby" as context
 (e.g. as the expected type).
@@ -163,7 +163,7 @@
    An incomplete_type_declaration declares an incomplete view of a type,
    and its first subtype; the first subtype is unconstrained if a
    known_discriminant_part appears. If the incomplete_type_declaration includes
-   the keyword TAGGED, it declares a tagged incomplete view. An incomplete
+   the reserved word tagged, it declares a tagged incomplete view. An incomplete
    view of a type is a limited view of the type (see 7.5).
 
 AARM Change: We define "incomplete view" and "tagged incomplete view" here.
@@ -193,16 +193,16 @@
 
    with P.C;
    package body P is
-       -- Ptr.all is not legal here, but it is in the scope of a non-limited
+       -- Ptr.all is not legal here, but it is in the scope of a nonlimited
        -- with_clause for P.
        type T is ...
        -- Ptr.all is legal here.
    end P;
 
-AI-217 Note: The above rules come from AI-217-06. Note that here we say that
+AI-217 Note: The above rules come from AI-217-6. Note that here we say that
   the view is complete, and thus none of the restrictions outlined in this
   section apply, not just dereferencing as the AI-217-6 wording said. That
-  is what was intended by AI-217-06 (the wording was faulty).
+  is what was intended by AI-217-6 (the wording was faulty).
 
 4.1(9): No change is needed. Note that this differs from the proposed AI-217-6.
 
@@ -361,6 +361,21 @@
 With this rule in hand, we only need to disallow dereferences which are
 prefixes (the first two cases above).
 
+Note that this AI corrects the interpretation of AI-183. In particular, the
+second example from AI-183:
+
+   package P2 is
+   private
+      type T1;
+      type T2;
+      procedure P (X1 : access T1; X2 : access T2);
+         -- Illegal.
+   end;
+
+Is now illegal because the types are used in the declaration of a primitive
+operation, but are not completed in the private part. The legality no longer
+depends on the full type declarations.
+
 !example
 
 Here is the example from AI-217-6, recast to use the additional capabilities
@@ -476,7 +491,7 @@
 is nevertheless allowed to have discriminants, either explicitly, or inherited
 via derivation.
 @dby
-If an @fa<incomplete_type_declaration> includes the keyword @b<tagged>, then a
+If an @fa<incomplete_type_declaration> includes the reserved word @b<tagged>, then a
 @fa<full_type_declaration> that completes it shall declare a tagged type.
 If an @fa<incomplete_type_declaration> has a @fa<known_discriminant_part>, then
 a @fa<full_type_declaration> that completes it shall have a fully conforming
@@ -489,10 +504,10 @@
 !corrigendum 3.10.1(5)
 
 @drepl
-The only allowed uses of a name that denotes an @fa<incomplete_type_declaration>
-are as follows:
+The only allowed uses of a @fa<name> that denotes an
+@fa<incomplete_type_declaration> are as follows:
 @dby
-A name that denotes an incomplete view of a type may be used as follows:
+A @fa<name> that denotes an incomplete view of a type may be used as follows:
 
 !corrigendum 3.10.1(7)
 
@@ -507,7 +522,7 @@
 @dby
 @xbullet<as the @fa<subtype_mark> in an @fa<access_definition>.>
 
-If such a name denotes a tagged incomplete view, it may also be used:
+If such a @fa<name> denotes a tagged incomplete view, it may also be used:
 
 @xbullet<as the @fa<subtype_mark> defining the subtype of a parameter in a
 @fa<formal_part>;>
@@ -524,9 +539,9 @@
 @dby
 @xbullet<as the prefix of an @fa<attribute_reference> whose
 @fa<attribute_designator> is Class; such an @fa<attribute_reference> is
-restricted to the uses allowed above for tagged incomplete views.>
+restricted to the uses allowed here; it denotes a tagged incomplete view.>
 
-If such a name occurs within the list of declarative_items containing
+If such a @fa<name> occurs within the list of declarative_items containing
 the completion of the incomplete view, it may also be used:
 
 @xbullet<as the @fa<subtype_mark> defining the subtype of a parameter or result
@@ -563,7 +578,7 @@
 a dereference of a value of type A also has this incomplete view
 except when:
 @xbullet<it occurs in the immediate scope of the completion of T, or>
-@xbullet<it occurs in the scope of a nonlimited_with_clause that mentions
+@xbullet<it occurs in the scope of a @fa<nonlimited_with_clause> that mentions
 a library package in whose visible part the completion of T is declared.>
 In these cases, the dereference has the full view of T.
 

Questions? Ask the ACAA Technical Agent