CVS difference for ai12s/ai12-0343-1.txt
--- ai12s/ai12-0343-1.txt 2020/01/09 04:14:41 1.3
+++ ai12s/ai12-0343-1.txt 2020/01/16 05:42:06 1.4
@@ -1,8 +1,10 @@
-!standard 6.5(5.12/5) 20-01-08 AI12-0343-1/02
+!standard 6.5(5.12/5) 20-01-15 AI12-0343-1/03
!standard 6.5(8/4)
!standard 6.5(8.1/3)
!standard 6.5(21/3)
!class binding interpretation 19-09-27
+!status Amendment 1-2012 20-01-15
+!status ARG Approved 13-0-1 20-01-15
!status work item 19-09-27
!status received 19-09-17
!priority Low
@@ -69,14 +71,11 @@
A check is performed that the return value satisfies the predicates of the
return subtype.
- AARM Implementation Note: The subtype conversion for of the return
+ AARM Implementation Note: The subtype conversion of the return
expression for a simple_return_statement performs this same check. The
- permissions of 11.4.1 ensure that duplicate evaluation of a predicate is
+ permissions of 11.4.2 ensure that duplicate evaluation of a predicate is
never required, so a single evaluation of the predicate is enough in this
- case. Similarly, if the sequence_of_statements of an
- extended_return_statement doesn't modify the return object, the predicate
- check that occurs when that object is created is sufficient and does not
- need to be repeated.
+ case.
!discussion
@@ -138,7 +137,7 @@
end return;
end Foo;
-It seems odd that using an extended return statement removes a guarentee about
+It seems odd that using an extended return statement removes a guarantee about
the predicate of the return subtype. This sort of dependence on the exact way
some code is written is uncomfortable (at least to the author). Thus we propose
to make a predicate check immediately before returning from an extended return
@@ -151,17 +150,13 @@
---
We reorder the wording so that the text about the evaluation of the
-sequence_of_statements comes betweent the 6.5(8/4) check and the 6.5(8.1/3)
+sequence_of_statements comes between the 6.5(8/4) check and the 6.5(8.1/3)
check. This implicitly gives an order of evaluation of the checks, and we
specify that explicitly by an AARM note so that no one is confused by our
subtlety. Explicitly mentioning the order repeatedly would harm readability,
and we'd probably want to define a term for something like "immediately before
-return" to we wouldn't need a lengthy description of the exact point of the
-check.
-
-[Author's note: The above idea was suggested by Tucker at the last ARG
-meeting; I just followed orders. If you don't like it, don't shoot the
-messenger. If you do it like it, I'll be happy to take credit for it. ;-)]
+return" so that we wouldn't need a lengthy description of the exact point of
+the check.
We define the extra predicate check in 6.5 (and thus before the subprogram
returns) so that a compiler can eliminate a potentially duplicate check (as a
Questions? Ask the ACAA Technical Agent