CVS difference for ai12s/ai12-0343-1.txt
--- ai12s/ai12-0343-1.txt 2019/09/28 02:20:57 1.1
+++ ai12s/ai12-0343-1.txt 2019/10/02 01:42:49 1.2
@@ -440,3 +440,42 @@
Anyway, thanks for thinking about this.
****************************************************************
+
+From: Randy Brukardt
+Sent: Friday, September 27, 2019 9:21 PM
+
+Attached find my AI [version /01 of AI12-0343-1] for this issue. I didn't
+propose detailed wording as I think the proposal needs a bit of discussion
+before spending time on that. I'm proposing the following:
+
+ The check of 6.5(8/4) is made immediately after the return object is
+ created (that is, immediately after the semantics of 6.5(5.12/5)
+ for an extended return).
+
+ The checks of 6.5(8.1/3) and 6.5(21/3) are made immediately before
+ an object is returned. If the return statement is prematurely completed
+ without returning, then these checks are not made.
+
+ For an extended return statement, any predicate that applies to the
+ return subtype is checked immediately before an object is returned.
+ (This check probably should be added to 3.2.4, near the "in out"
+ by-reference check.)
+
+There is a detailed discussion of why I'm making this particular proposal in
+the !discussion of the AI.
+
+The last item might be a bit controversial (in that we know that dynamic
+predicates have holes when individual components are changed). However, we
+went out of our way to mandate a predicate check on return for in-out/out
+by-reference parameters, which otherwise would not naturally have one. The
+only reason for doing that is an assumption that we do not want the
+implementation of the subprogram to "leak" out vis-a-vis component
+modifications. It seems to be exactly the same case for the return object
+-- indeed it seems crazy to worry about ensuring that predicates are met
+for out parameters at the subprogram boundary and yet not enforce them on
+the object returned from an extended return statement. One imagines those
+two things are different ways of doing the same thing (return a value
+from a subprogram), and they probably ought to have the same requirements
+for predicate checks.
+
+****************************************************************
Questions? Ask the ACAA Technical Agent