CVS difference for arm/source/10.mss

Differences between 1.43 and version 1.44
Log of other versions for file arm/source/10.mss

--- arm/source/10.mss	2005/03/10 06:19:59	1.43
+++ arm/source/10.mss	2005/03/18 06:37:20	1.44
@@ -1,10 +1,10 @@
 @Part(10, Root="ada.mss")
-@Comment{$Date: 2005/03/10 06:19:59 $}
+@Comment{$Date: 2005/03/18 06:37:20 $}
 @LabeledSection{Program Structure and Compilation Issues}
 @Comment{$Source: e:\\cvsroot/ARM/Source/10.mss,v $}
-@Comment{$Revision: 1.43 $}
+@Comment{$Revision: 1.44 $}
 @Comment{Corrigendum changes added, 2000/04/24, RLB}
@@ -399,7 +399,7 @@
 @ChgAdded{Version=[2],Text=[For each library @nt{package_declaration} in the
 environment, there is an implicit declaration of a
-@i{limited view}@Defn{limited view} of that library package. The
+@i{limited view} of that library package.@Defn{limited view} The
 limited view of a package contains:]}
@@ -1104,20 +1104,20 @@
 @key[package] A.B.C.D @key[is]
 @key[end] A.B.C.D;
-@key[with] A.B.C; -- (1)
+@key[with] A.B.C; -- @RI[(1)]
 @key[private] @key[package] A.B.X @key[is]
 @key[end] A.B.X;
 @key[package] A.B.Y @key[is]
 @key[end] A.B.Y;
-@key[with] A.B.C; -- (2)
+@key[with] A.B.C; -- @RI[(2)]
 @key[package] @key[body] A.B.Y @key[is]
 @key[end] A.B.Y;
-@ChgRef{Version=[2],Kind=[Revised]}@Chg{Version=[2],New=[@key[private] @key[with] A.B.C; -- (3)
+@ChgRef{Version=[2],Kind=[Added]}@ChgAdded{Version=[2],Text=[@key[private] @key[with] A.B.C; -- @RI[(3)]
 @key[package] A.B.Z @key[is]
-@key[end] A.B.Z;],Old=[]}
+@key[end] A.B.Z;]}
@@ -1242,7 +1242,7 @@
 @ChgAdded{Version=[2],Text=[This prevents visibility issues, where whether an entity
 is an incomplete or full view depends on how the name of the entity is written.
 The @nt{limited_with_clause} cannot be useful, as we must have the full view
-available in the parent in order for the @nt{use_clause} to be given.], Old=[]}
+available in the parent in order for the @nt{use_clause} to be given.]}
@@ -2399,9 +2399,10 @@
 @key[task] @RI{Environment_Task};
+@ChgRef{Version=[2],Kind=[Revised]}@Comment{The fonts corrected below}
 @key[task] @key[body] @RI{Environment_Task} @key[is]
     ... (1) --@RI{ The environment @nt{declarative_part}}
-            --@RI{ (that is, the sequence of @nt{library_item}s) goes here.}
+            --@RI{ (that is, the sequence of @nt{library_item}}@RI{s) goes here.}@ChgNote{Extra RI to fix bug}
     ... (2) --@RI{ Call the main subprogram, if there is one.}
 @key[end] @RI{Environment_Task};
@@ -2941,17 +2942,49 @@
+@ChgAdded{Version=[2],Type=[Leading],Text=[]}@Comment{Phony addition to get conditional leading}
 A generic body is
 preelaborable only if elaboration of a corresponding
 instance body would not perform any such actions,
-presuming that the actual for each formal private type (or extension) is
+presuming that@Chg{Version=[2],New=[:],Old=[ the actual for each formal
+private type (or extension) is
 a private type (or extension), and the actual for each
-formal subprogram is a user-defined subprogram.
+formal subprogram is a user-defined subprogram.]}
 @Defn{generic contract issue}
-Without this rule about generics, we would have to forbid
-instantiations in preelaborated library units,
-which would significantly reduce their usefulness.
+@ChgAdded{Version=[2],Text=[the actual for each formal private type (or
+extension) declared within the formal part of the generic unit is a private
+type (or extension) that does not have preelaborable initialization;]}
+@ChgAdded{Version=[2],Text=[the actual for each formal type is nonstatic;]}
+@ChgAdded{Version=[2],Text=[the actual for each formal object is nonstatic; and]}
+@ChgAdded{Version=[2],Text=[the actual for each formal subprogram is a
+user-defined subprogram.]}
+  @ChgRef{Version=[2],Kind=[Added],ARef=[AI95-00403-01]}
+  @ChgAdded{Version=[2],Text=[This is an @lquotes@;assume-the-worst@rquotes
+  rule. The elaboration of a generic unit doesn't perform any of the actions
+  listed above, because its sole effect is to establish that the generic can
+  from now on be instantiated. So the elaboration of the generic itself is not
+  the interesting part when it comes to preelaboration rules. The interesting
+  part is what happens when you elaborate @lquotes@;any instantiation@rquotes
+  of the generic. For instance, declaring an object of a limited formal private
+  type might well start tasks, call functions, and do all sorts of
+  non-preelaborable things. We prevent these situations by assuming that the
+  actual parameters are as badly behaved as possible.]}
+  Without this rule about generics, we would have to forbid
+  instantiations in preelaborated library units,
+  which would significantly reduce their usefulness.
@@ -3351,4 +3384,8 @@
   @ChgAdded{Version=[2],Text=[@B<Corrigendum:> The wording was changed so that
   subunits of a preelaborated subprogram are also preelaborated.]}
+  @ChgRef{Version=[2],Kind=[AddedNormal],ARef=[AI95-00403-01]}
+  @ChgAdded{Version=[2],Text=[Added wording to cover missing cases for
+  preelaborated generic units.]}

Questions? Ask the ACAA Technical Agent