CVS difference for ai12s/ai12-0301-1.txt
--- ai12s/ai12-0301-1.txt 2019/01/10 23:27:52 1.1
+++ ai12s/ai12-0301-1.txt 2019/01/15 23:00:17 1.2
@@ -1,5 +1,7 @@
-!standard 3.2.4(31/4) 19-01-09 AI12-0301-1/01
+!standard 3.2.4(31/4) 19-01-15 AI12-0301-1/02
!class binding interpretation 19-01-09
+!status Amendment 1-2012 19-01-15
+!status ARG Approved 11-0-0 19-01-14
!status work item 19-01-09
!status received 18-12-17
!priority Low
@@ -16,7 +18,7 @@
3.2.4(31/4) says that predicates are not checked for default-initialized
objects unless "any subcomponents have default_expressions". This seems
different than the rule for constraints and exclusions of stand-alone objects,
-which check them if an inplicit initial value is defined.
+which check those if an implicit initial value is defined.
Should this be fixed? (Yes.)
@@ -82,6 +84,34 @@
will get predicate checks that did not in the past. This is not as likely to
happen as Default_Value is used much less frequently than access types, and it
was a new feature in Ada 2012, so it does not appear in any legacy code.
+
+!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 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 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.>
!ASIS
Questions? Ask the ACAA Technical Agent