CVS difference for arm/source/12.mss

Differences between 1.77 and version 1.78
Log of other versions for file arm/source/12.mss

--- arm/source/12.mss	2011/02/05 09:14:58	1.77
+++ arm/source/12.mss	2011/04/07 06:18:37	1.78
@@ -1,10 +1,10 @@
 @Part(12, Root="ada.mss")
-@Comment{$Date: 2011/02/05 09:14:58 $}
+@Comment{$Date: 2011/04/07 06:18:37 $}
 @LabeledSection{Generic Units}
 @Comment{$Source: e:\\cvsroot/ARM/Source/12.mss,v $}
-@Comment{$Revision: 1.77 $}
+@Comment{$Revision: 1.78 $}
 @Defn{generic unit}
@@ -1977,6 +1977,7 @@
 @Defn2{Term=[ancestor subtype], Sec=(of a formal derived type)}
 @PDefn{private extension}
 The @i(ancestor subtype) of a formal derived type is the
@@ -1996,7 +1997,8 @@
 only if the ancestor type @Redundant[and any progenitor types] are limited types.
 The reserved word @key{synchronized} shall appear (rather than @key{limited}) if
 the ancestor type or any of the progenitor types are
-synchronized interfaces.],Old=[]}
+synchronized interfaces.],Old=[]}@Chg{Version=[3],New=[ The ancestor type shall be a limited interface if the reserved
+word @key{synchonized} appears.],Old=[]}
 We use the term @lquotes@;ancestor@rquotes@; here instead of @lquotes@;parent@rquotes@;
@@ -2435,6 +2437,13 @@
   @ChgAdded{Version=[3],Text=[@b<Correction:> Fixed hole that failed
   to define what happened for "=" for an untagged private type whose
   actual is class-wide.]}
+  @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0237-1]}
+  @ChgAdded{Version=[3],Text=[@b<Correction:> Added missing rule for the
+  ancestors of formal derived types. The added rule would formally be
+  incompatible, but since it would be impossible to instantiate any such
+  generic, this cannot happen outside of test suites and thus is not
+  documented as an incompatibility.]}
@@ -3327,6 +3336,7 @@
 associations are not allowed for the corresponding actuals.]}
+@ChgRef{Version=[3],Kind=[RevisedAdded]}@Comment{Because this is renumbered by the above}
 @ChgAdded{Version=[2],Text=[A @nt<formal_package_actual_part> shall contain
 at most one @nt<formal_package_association> for each formal parameter. If the
 @nt<formal_package_actual_part> does not include
@@ -3334,6 +3344,41 @@
 formal parameter without an association shall have a @nt<default_expression>
 or @nt<subprogram_default>.]}
+@ChgAdded{Version=[3],Text=[The rules for matching between
+@nt{formal_package_association}s and the generic formals of the template are as
+  @ChgRef{Version=[3],Kind=[Added]}
+  @ChgAdded{Version=[3],Text=[If all of the @nt{formal_package_association}s are
+  given by generic associations, the @nt{explicit_generic_actual_parameter}s of
+  the @nt{formal_package_association}s shall be legal for an instantiation of the
+  template.]}
+  @ChgRef{Version=[3],Kind=[Added]}
+  @ChgAdded{Version=[3],Text=[If a @nt{formal_package_association} for a formal
+  type @i<T> of the template is given by <>, then the
+  @nt{formal_package_association} for any other
+  @nt{generic_formal_parameter_declaration} of
+  the template that mentions @i<T> directly or indirectly must be
+  given by <> as well.]}
+  @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0200-1]}
+  @ChgAdded{Version=[3],Text=[The above rule is simple to state, though it does
+  not reflect the fact that the formal package functions like an instantiation
+  of a special kind, where each box association for a
+  @nt{generic_formal_parameter_declaration} @i<F> is replaced with a new entity
+  @i<F>' that has the same characteristics as @i<F>: if @i<F> is a formal
+  discrete type then @i<F>' is a discrete type, if @i<F> is a formal subprogram
+  then @i<F>' is a subprogram with a similar signature, etc. In practice this is
+  achieved by making the association into a copy of the declaration of the
+  generic formal.]}
 @Leading@;The actual shall be an instance of the template.
 If the @nt<formal_package_actual_part> is (<>)@Chg{Version=[2],
@@ -3543,6 +3588,19 @@
   is done when the actual is a formal package.]}
+  @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0025-1],ARef=[AI05-0200-1]}
+  @ChgAdded{Version=[3],Text=[@Defn{incompatibilities with Ada 2005}@b<Correction:>
+  Added missing rules for parameters of generic formal package that
+  parallel those in @RefSecNum{Generic Instantiation}, as well as some
+  specific to <> parameters. These are technically incompatibilities because
+  generic formal package parameters that Ada 95
+  and Ada 2005 would have considered legal now have to be rejected. But this
+  should not be an issue in practice as such formal parameters could not have
+  matched any actual generics. And it is quite likely that implementations
+  already enforce some of these rules.]}
   @ChgAdded{Version=[3],Text=[@Defn{extensions to Ada 2005}
@@ -3550,13 +3608,6 @@
   a @nt{formal_package_declaration}.
   This is described in @RefSecNum{Aspect Specifications}.]}
-  @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0025-1]}
-  @ChgAdded{Version=[3],Text=[@b<Correction:> Missing rules for generic
-  parameters to parallel those in @RefSecNum{Generic Instantiation}
-  were added.]}
 @LabeledClause{Example of a Generic Package}

Questions? Ask the ACAA Technical Agent