CVS difference for ais/ai-00423.txt

Differences between 1.3 and version 1.4
Log of other versions for file ais/ai-00423.txt

--- ais/ai-00423.txt	2005/04/05 00:45:35	1.3
+++ ais/ai-00423.txt	2005/05/10 17:31:12	1.4
@@ -1,4 +1,4 @@
-!standard 8.5.1(2)                                    05-04-04  AI95-00423/03
+!standard 8.5.1(2)                                    05-04-17  AI95-00423/04
 !standard 8.5.1(4)
 !standard 8.5.4(4)
 !standard 12.4(2)
@@ -59,6 +59,9 @@
 
 Similar rules should apply to generic subprograms.
 
+In generic bodies we use an assume-the-worst rule to ensure that "not null"
+doesn't lie.
+
 Finally, it is curious that anonymous access types are not permitted for
 generic formal objects. This is likely to make it unnecessarily hard to turn a
 nongeneric package into a generic package. This restriction is lifted.
@@ -71,18 +74,27 @@
 Add after 8.5.1(4):
 
 For an object_renaming_declaration with an access_definition that has a
-null_exclusion, the subtype of the object_name shall exclude null. Furthermore,
-if the access_definition specifies an access-to-subprogram type, and a
-parameter or result type of its designated profile has a null_exclusion, the
-subtype of the corresponding parameter or result type of the designated profile
-of the object_name shall exclude null.
+null_exclusion:
+
+o  if the object_renaming_declaration occurs within the body of a generic unit,
+   the object_name shall only denote a generic formal object of that generic
+   unit if the declaration of that formal object has a null_exclusion;
+
+o  otherwise, the subtype of the object_name shall exclude the null value.
 
 Add after 8.5.4(4):
 
 For a parameter or result type of the subprogram_specification that has a
-null_exclusion, the subtype of the corresponding parameter or result type of
-the renamed callable entity shall exclude null.
+null_exclusion:
 
+o   if the subprogram_renaming_declaration occurs within the body of a generic
+    unit, the callable_entity_name shall only denote a generic formal subprogram of
+    that generic unit if the corresponding parameter or result type of that
+    formal subprogram has a null_exclusion;
+
+o   otherwise, the subtype of the corresponding parameter or result type of the
+    renamed callable entity shall exclude the null value.
+
 Change 12.4(2) to read:
 
 formal_object_declaration ::=
@@ -102,13 +114,24 @@
 
 Add after 12.4(7):
 
+In the case where the type is defined by an access_definition, the type of the
+actual and the type of the formal:
+
+o   shall both be access-to-object types with statically matching designated
+    subtypes and with both or neither being access-to-constant types; and
+
+o   shall both be access-to-subprogram types with subtype conformant designated
+    profiles.
+
 For a formal_object_declaration with an access_definition that has a
-null_exclusion, the subtype of the actual shall exclude null. Furthermore, if
-the access_definition specifies an access-to-subprogram type, and a parameter
-or result type of its designated profile has a null_exclusion, the subtype of
-the corresponding parameter or result type of the designated profile of the
-actual shall exclude null.
+null_exclusion:
+
+o   for an instantiation that occurs within the body of a generic unit, the actual
+    shall only denote a generic formal object of that generic unit if the declaration
+    of that formal object has a null_exclusion;
 
+o   otherwise, the subtype of the actual shall exclude the null value.
+
 Change 12.4(9) to read:
 
 A formal_object_declaration declares a generic formal object. The default mode
@@ -123,8 +146,15 @@
 Add after 12.6(8):
 
 For a parameter or result type of the formal_subprogram_declaration that has a
-null_exclusion, the subtype of the corresponding parameter or result type of
-the actual shall exclude null.
+null_exclusion:
+
+o   for an instantiation that occurs within the body of a generic unit, the actual
+    shall only denote a generic formal subprogram of that generic unit if the
+    corresponding parameter or result type of that formal subprogram has a
+    null_exclusion,
+
+o   otherwise, the subtype of the corresponding parameter or result type of the
+    actual shall exclude the null value.
 
 !discussion
 

Questions? Ask the ACAA Technical Agent