CVS difference for arm/source/03b.mss

Differences between 1.30 and version 1.31
Log of other versions for file arm/source/03b.mss

--- arm/source/03b.mss	2004/11/08 04:56:35	1.30
+++ arm/source/03b.mss	2004/11/12 06:10:15	1.31
@@ -1,9 +1,9 @@
 @Part(03, Root="ada.mss")
-@Comment{$Date: 2004/11/08 04:56:35 $}
+@Comment{$Date: 2004/11/12 06:10:15 $}
 @Comment{$Source: e:\\cvsroot/ARM/Source/03b.mss,v $}
-@Comment{$Revision: 1.30 $}
+@Comment{$Revision: 1.31 $}
 @LabeledClause{Array Types}
@@ -247,7 +247,7 @@
 and consists of the elaboration of any @nt{discrete_@!subtype_@!definition}s
 and the @nt{component_@!definition}.
 @PDefn2{Term=[elaboration], Sec=(discrete_subtype_definition)}
 The elaboration of a @nt{discrete_subtype_definition}
 @Chg{New=[that does not contain any per-object expressions],Old=[]}
@@ -345,6 +345,13 @@
+@Chg{Version=[2],New=[@b<Corrigendum:> Added wording to allow
+the elaboration of per-object constraints for constrained arrays.],Old=[]}
 @LabeledSubClause{Index Constraints and Discrete Ranges}
@@ -496,7 +503,7 @@
 The following attributes are defined for
 @ChgPrefixType{Version=[1],Kind=[Revised],Text=[a @Chg{New=[@nt{prefix}],
 Old=[prefix]} A that is of an array type
@@ -668,6 +675,7 @@
 to the term @i(character type).
@@ -704,7 +712,6 @@
 @Syn{lhs=<discriminant_part>,rhs="@Syn2{unknown_discriminant_part} | @Syn2{known_discriminant_part}"}
@@ -725,7 +732,7 @@
 A @Chg{New=[@nt{discriminant_part}],Old=[@nt{known_discriminant_part}]} is only
 permitted in a declaration for a composite type that is not an array type
 @Redundant[(this includes generic formal types)]@Chg{New=[. A],Old=[; a]}
@@ -744,7 +751,7 @@
   Furthermore, the full type for a type with unknown discriminants
   need not even be composite, much less have any discriminants.
-  @ChgRef{Version=[1],Kind=[Added],Ref=[8652/0007]}
+  @ChgRef{Version=[1],Kind=[Added],Ref=[8652/0007],ARef=[AI95-00098-01]}
   @Chg{New=[On the other hand, @nt<unknown_discriminant_part>s cannot be
   applied to type declarations that cannot have a @nt<known_discriminant_part>.
   There is no point in having unknown discriminants on a type that can never
@@ -1198,6 +1205,14 @@
+@Chg{Version=[2],New=[@b<Corrigendum:> The wording was clarified so that
+types that cannot have discriminants cannot have a
 @LabeledSubClause{Discriminant Constraints}
@@ -1253,7 +1268,7 @@
 A @nt{discriminant_constraint} is only allowed in a
 @nt{subtype_indication} whose @nt{subtype_mark} denotes
 either an unconstrained discriminated subtype, or an
@@ -1265,7 +1280,7 @@
 is constrained.],
 @Chg{New=[The second rule is necessary to prevent assignments that change the
 discriminant of a constrained object. See the defect report for examples.],Old=[]}
@@ -1377,6 +1392,19 @@
 seem worth putting it in a "NOTE."
+@Chg{Version=[2],New=[@b<Corrigendum:> @Defn{incompatibilities with Ada 95}
+For general access subtypes, @nt{discriminant_constraint}s are prohibited
+if the designated type can be treated as constrained somewhere in the program.
+Ada 2005 goes further and prohibits such @nt{discriminant_constraint}s if
+the designated type has (or might have, in the case of a formal type)
+defaults for its discriminants. The use of general access subtypes is rare,
+and this eliminates a boatload of problems which can cause programs to
 @LabeledSubClause{Operations of Discriminated Types}
@@ -1465,6 +1493,7 @@
 subprogram calls.
 @LabeledClause{Record Types}
@@ -1490,7 +1519,7 @@
    | {@Syn2{component_item}} @Syn2{variant_part}
    |  @key{null};"}
 @Syn{lhs=<component_item>,rhs="@Syn2{component_declaration} | @Chg{New=[@Syn2{aspect_clause}],Old=[@Syn2{representation_clause}]}"}
@@ -1647,7 +1676,7 @@
   each @nt<defining_identifier> in the list.
 @Defn{per-object expression}
 @Defn{per-object constraint}
 @Defn{entry index subtype}
@@ -1677,7 +1706,7 @@
 association in a discriminant constraint, in which case it is evaluated once
 for each associated discriminant.],Old=[]}
 @Chg{New=[@PDefn2{Term=[Elaboration],Sec=(per-object constraint)}When a
 per-object constraint is elaborated @Redundant[(as part of creating an
 object)], each per-object expression of the constraint is evaluated. For other
@@ -1785,7 +1814,7 @@
 The syntax rules now allow @Chg{New=[@nt{aspect_clause}s],
 Old=[@nt{representation_clause}s]} to appear in a @nt{record_definition}.
 This is not a language extension, because @LegalityName@;s prevent all
@@ -1797,6 +1826,18 @@
 representation pragmas to be as similar as possible.
+@Chg{Version=[2],New=[@b<Corrigendum:> Improved the description of the
+elaboration of per-object constraints.],Old=[]}
+@Chg{Version=[2],New=[@b<Corrigendum:> Changed representation clauses to
+aspect clauses to reflect that they are used for more than just
 @LabeledSubClause{Variant Parts and Discrete Choices}
@@ -2796,7 +2837,7 @@
   controlling operands (if any) are tag indeterminate.
 @Redundant[A @nt<type_conversion> is statically or dynamically
 tagged according to whether the type determined by the @nt<subtype_mark>
 is specific or class-wide, respectively.]
@@ -2813,8 +2854,8 @@
   A @nt<type_conversion> is never tag indeterminate, even if its
   operand is. A designated object is never tag indeterminate.
-  @ChgRef{Version=[1],Kind=[Added],Ref=[8652/0010]}
-  @Chg{New=[Allocators and access attributes of specific types can be used as
+  @ChgRef{Version=[1],Kind=[Added],Ref=[8652/0010],ARef=[AI95-00127-01]}
+  @Chg{New=[Allocators and access attributes of class-wide types can be used as
   the controlling parameters of dispatching calls.],Old=[]}
@@ -2829,7 +2870,7 @@
   specific type of the statically tagged operand(s).
 If the expected type for an expression or @nt<name>
 is some specific tagged type, then the expression or @nt<name>
 shall not be dynamically tagged unless it is a controlling operand in a call
@@ -2855,7 +2896,7 @@
   See @RefSecNum(Relational Operators and Membership Tests).
 In the declaration of a dispatching operation of a tagged type,
 everywhere a subtype of the tagged type appears as a
 subtype of the profile (see @RefSecNum(Subprogram Declarations)),
@@ -2904,7 +2945,7 @@
   class-wide types.
   @Chg{New=[This restriction applies even if the partial view (see
   @RefSecNum{Private Types and Private Extensions}) of one or both
   of the types is untagged. This follows from the definition of dispatching
@@ -3145,6 +3186,20 @@
 The concept of dispatching operations is new.
+@Chg{Version=[2],New=[@b<Corrigendum:>@ChgNote{This is documented as an extension in the two sections referenced below.}
+Allocators and access attributes of objects of class-wide types
+can be used as the controlling parameter in a dispatching calls. This
+was an oversight in the definition of Ada 95. (See @RefSecNum{Operations of Access Types} and
+@Chg{Version=[2],New=[@b<Corrigendum:> Corrected the conventions of
+dispatching operations.],Old=[]}
 @LabeledSubClause{Abstract Types and Subprograms}
@@ -3533,7 +3588,7 @@
 @Defn{access-to-object type}
 @Defn{access-to-subprogram type}
 @Defn{pool-specific access type}
@@ -3859,7 +3914,7 @@
 the actual parameter is null.
 @Redundant[All subtypes of an access-to-subprogram type
@@ -3988,6 +4043,20 @@
 see @RefSecNum(Storage Management) for more discussion.)
+@Chg{Version=[2],New=[@b<Corrigendum:> Added accidentally omitted wording
+that says that a derived access type shares its storage pool with its
+parent type. This was clearly intended, both because of a note in
+@RefSecNum{Derived Types and Classes}, and because anything else would
+have been incompatible with Ada 83.],Old=[]}
+@Chg{Version=[2],New=[@b<Corrigendum:> Fixed typographical errors in
+the description of when access types are constrained.],Old=[]}
 @LabeledSubClause{Incomplete Type Declarations}
@@ -4802,7 +4871,7 @@
   Text=<X'Access yields an access value that designates the object
   denoted by X. The type of X'Access is an access-to-object type,
   as determined by the expected type.
-  The expected type shall be a general access type.>}
+  The expected type shall be a general access type.>}@ChgNote{Should have ARef=[AI95-00127-01], but not allowed yet.}
 @IndexSeeAlso{Term=[Unchecked_Access attribute],See=(Access attribute)}
   X shall denote an aliased view of an object@Redundant[, including possibly the
@@ -4878,7 +4947,7 @@
      (see @RefSecNum(Discriminants)).
-  @ChgRef{Version=[1],Kind=[Revised],Ref=[8652/0010]}
+  @ChgRef{Version=[1],Kind=[Revised],Ref=[8652/0010],ARef=[AI95-00127-01]}
   If @Chg{New=[@i(A) is a named access type and @i(D) is a tagged type],
   Old=[the designated type of @i(A) is tagged]}, then the type of the view
   shall be covered by @Chg{New=[@i(D)],Old=[the designated type]};
@@ -4899,7 +4968,7 @@
     with it, but need not be if its nominal subtype is constrained.
-  @ChgRef{Version=[1],Kind=[Added],Ref=[8652/0010]}
+  @ChgRef{Version=[1],Kind=[Added],Ref=[8652/0010],ARef=[AI95-00127-01]}
   @Chg{New=[An access attribute can be used as the controlling operand in a
   dispatching call; see @RefSecNum{Dispatching Operations of Tagged Types}.],
@@ -5097,6 +5166,17 @@
 while X'Last is not. See AI83-00154.
+@Chg{Version=[2],New=[@b<Corrigendum:> @Defn{extensions to Ada 95}
+Access attributes of objects of class-wide types
+can be used as the controlling parameter in a dispatching calls (see
+@RefSecNum{Dispatching Operations of Tagged Types}). This was an oversight in
+Ada 95.],Old=[]}
 @LabeledClause{Declarative Parts}
@@ -5111,7 +5191,7 @@
     @Syn2{basic_declarative_item} | @Syn2{body}"}
     @Syn2{basic_declaration} | @Chg{New=[@Syn2{aspect_clause}],Old=[@Syn2{representation_clause}]} | @Syn2{use_clause}"}
@@ -5149,7 +5229,7 @@
 For a construct that attempts to use a body,
 a check (Elaboration_Check) is performed, as follows:
 For a call to a (non-protected) subprogram that has
 an explicit body, a check is made that the
 @Chg{New=[body],Old=[@nt{subprogram_body}]} is already elaborated.
@@ -5163,7 +5243,7 @@
   of parameters and the elaboration check occur in an arbitrary order.
   AI83-00406 applies to generic instantiation as well (see below).
-  @ChgRef{Version=[1],Kind=[Added],Ref=[8652/0014]}
+  @ChgRef{Version=[1],Kind=[Added],Ref=[8652/0014],ARef=[AI95-00064-01]}
   @Chg{New=[A subprogram can be completed by a renames-as-body, and we need
   to make an elaboration check on such a body, so we use
   @lquotes@;body@rquotes@; rather than @nt{subprogram_body} above.],Old=[]}
@@ -5257,10 +5337,22 @@
 is equivalent to one with an empty one.
+@Chg{Version=[2],New=[@b<Corrigendum:> Changed representation clauses to
+aspect clauses to reflect that they are used for more than just
+@Chg{Version=[2],New=[@b<Corrigendum:> Clarified that the elaboration check
+applies to all kinds of subprogram bodies.],Old=[]}
 @LabeledSubClause{Completions of Declarations}
 Declarations sometimes come in two parts.
 @Defn{requires a completion}
 A declaration that requires a second part is said to @i(require completion).
@@ -5403,4 +5495,11 @@
 a full type for an incomplete or private type, a full constant
 declaration for a deferred constant declaration, or a @nt{pragma} Import
 for any kind of entity.
\ No newline at end of file
+@Chg{Version=[2],New=[@b<Corrigendum:> Added a definition of @i{body}, which
+is different than @nt{body} or @key{body}. At least @i{body} is the same as
+body. We wouldn't want it to be too easy to understand!],Old=[]}

Questions? Ask the ACAA Technical Agent