CVS difference for ai12s/ai12-0333-1.txt

Differences between 1.4 and version 1.5
Log of other versions for file ai12s/ai12-0333-1.txt

--- ai12s/ai12-0333-1.txt	2019/06/11 04:13:55	1.4
+++ ai12s/ai12-0333-1.txt	2019/07/04 01:43:46	1.5
@@ -1,5 +1,9 @@
-!standard 3.2.4(31/5)                                  19-05-31  AI12-0333-1/03
+!standard 3.2.4(31/5)                                  19-07-03  AI12-0333-1/04
+!standard 4.6(51/4)
+!standard 6.4.1(14)
 !class Amendment 19-05-07
+!status Amendment 1-2012 19-07-03
+!status ARG Approved 10-0-0  19-06-14
 !status work item 19-05-07
 !status received 19-05-06
 !priority Low
@@ -43,6 +47,15 @@
   that the value of the created object satisfies the predicates of the
   nominal subtype.
 
+  AARM Ramification: Most parameter passing is covered by the subtype
+  conversion rule: all inbound *in* and *in out* parameters are converted
+  to the formal subtype, and the copy-back for by-copy *out* and *in out* 
+  parameters are converted to the actual subtype. The remaining parameter
+  passing cases are covered by special rules: by-reference *out* and 
+  *in out* parameters by the rule given above, and we don't want any 
+  predicate checks on inbound *out* parameters, accomplished in part
+  by a special rule in 4.6.
+
 Modify 4.6(51/4) as follows:
 
   After conversion of the value to the target type, if the target
@@ -58,6 +71,11 @@
    * an implicit subtype conversion of an actual parameter of mode out
      to the nominal subtype of its formal parameter}.
 
+  AARM Ramification: The reverse conversion applied to by-copy out 
+  parameters is /not/ a view conversion and it is to the nominal subtype
+  of the /actual/ parameter, therefore any enabled predicate 
+  checks /are/ performed.
+
 Modify 6.4.1(14) as follows:
 
   For a composite type with discriminants or that has implicit initial
@@ -82,6 +100,66 @@
 makes the most sense to avoid any checking of predicates for inbound out
 parameters (of course, the predicates will be checked when the
 subprogram returns).
+
+!corrigendum 3.2.4(31/4)
+
+@drepl
+@xindent<On every subtype conversion, a check is performed that the operand
+satisfies the predicates of the target subtype. This includes all
+parameter passing, except for certain parameters passed by reference, which
+are covered by the following rule: After normal completion and leaving of a
+subprogram, for each @b<in out> or @b<out> parameter that is passed by reference,
+a check is performed that the value of the parameter satisfies the predicates
+of the subtype of the actual. For an object created by an @fa<object_declaration>
+with no explicit initialization @fa<expression>, or by an uninitialized
+@fa<allocator>, if any subcomponents have @fa<default_expression>s, a check
+is performed that the value of the created object satisfies the predicates of
+the nominal subtype.>
+@dby
+@xindent<On a subtype conversion, a check is performed that the operand
+satisfies the predicates of the target subtype. In addition, after normal 
+completion and leaving of a
+subprogram, for each @b<in out> or @b<out> parameter that is passed by reference,
+a check is performed that the value of the parameter satisfies the predicates
+of the subtype of the actual. For an object created by an @fa<object_declaration>
+with no explicit initialization @fa<expression>, or by an uninitialized
+@fa<allocator>, if the types of any parts have specified Default_Value or 
+Default_Component_Value aspects, or any subcomponents have 
+@fa<default_expression>s, a check is performed that the value of the created 
+object satisfies the predicates of the nominal subtype.>
+
+!corrigendum 4.6(51/4)
+
+@drepl
+After conversion of the value to the target type, if the target subtype is constrained,
+a check is performed that the value satisfies this constraint. If the target subtype
+excludes null, then a check is made that the value is not null. If predicate checks
+are enabled for the target subtype (see 3.2.4), a check is performed that the value
+satisfies the predicates of the target subtype.
+@dby
+After conversion of the value to the target type, if the target
+subtype is constrained, a check is performed that the value satisfies
+this constraint. If the target subtype excludes null, then a check is
+made that the value is not null. If predicate checks are enabled for
+the target subtype (see 3.2.4), a check is performed that the value
+satisfies the predicates of the target subtype, unless the conversion is:
+
+@xbullet<a view conversion that is an actual parameter of mode @b<out>; or>
+
+@xbullet<an implicit subtype conversion of an actual parameter of mode @b<out>
+to the nominal subtype of its formal parameter.>
+
+!corrigendum 6.4.1(14)
+
+@drepl
+@xinbull<For a composite type with discriminants or that has implicit initial
+values for any subcomponents (see 3.3.1), the behavior is as for an @b<in out>
+parameter passed by copy.>
+@dby
+@xinbull<For a composite type with discriminants or that has implicit initial
+values for any subcomponents (see 3.3.1), the behavior is as for an @b<in out>
+parameter passed by copy, except that no predicate check is performed.>
+
 
 !ASIS
 

Questions? Ask the ACAA Technical Agent