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

Differences between 1.7 and version 1.8
Log of other versions for file ai12s/ai12-0103-1.txt

--- ai12s/ai12-0103-1.txt	2016/02/16 03:20:41	1.7
+++ ai12s/ai12-0103-1.txt	2016/08/20 00:11:47	1.8
@@ -75,7 +75,7 @@
 entry_body}[noninstance body other than a renames-as-body] causes freezing of
 each entity and profile declared before it within the same declarative_part
 that is not an incomplete type; it only causes freezing of an incomplete type
-if the body is within the immediate scope of the incomplete type. 
+if the body is within the immediate scope of the incomplete type.
 
 [Editor's note: In the new text, the syntax terms proper_body, body_stub, and
 entry_body do not include instances or renames, so we no longer need the
@@ -373,3 +373,92 @@
 
 ****************************************************************
 
+From: Ed Schonberg
+Sent: Monday, August 8, 2016  10:27 AM
+
+The AI provides the following example:
+
+
+Consider the following:
+
+package P is
+   type Priv is private;
+
+   Empty_Priv : constant Priv;
+
+   function Is_Empty (A : Priv) return Boolean; -- (1)
+
+private
+
+   type Priv is record
+      Len : Natural;
+      Data: Natural;
+   end record;
+
+   -- Completions still need checking (call case):
+   function Is_Empty (A : Priv) return Boolean is
+      (A = Empty_Priv or else A.Len = 0);     -- (2)
+      -- Not used in this package, so not frozen until the end of the package.
+
+   Empty_Priv : constant Priv := (Len => 0, Data => 0); -- (3) Freezes Priv.
+
+end P;
+
+and the text suggests that this works as expected with the old rule (expression
+functions don't freeze anything) and the new rule (the expression in an
+expression function that is a completion freezes).  But with the new rules the
+expression is illegal because the deferred constant is a reference to an
+incomplete entity which therefore cannot be frozen at that point.  Should the
+example be fixed, or the text that follows updated to indicate that this is now
+illegal?  The new freezing rule is not in question, it is obviously a desirable
+change.
+
+****************************************************************
+
+From: Randy Brukardt
+Sent: Monday, August 15, 2016  9:45 PM
+
+That's not an "example", it's the !question. There's nothing in the !question
+that refers to the final rule or results (there's no "Yes" or "No" in this
+question, because the situation is too complex for a simple answer).
+
+I don't see anything in this AI that describes what happens with this example
+under the approved rules (as opposed to the old rules). I would agree that the
+AI would have been better with this information, but as the AI is already WG 9
+approved and part of the Corrigendum, we can't change it any more. A "repair" AI
+would have no useful effect in this case as most people wouldn't see it  when
+they look at the existing one (and there's nothing wrong with the Standard or
+even the AARM).
+
+So I recommend "no action" on this comment.
+
+****************************************************************
+
+From: Ed Schonberg
+Sent: Tuesday, August 16, 2016  8:13 AM
+
+I stumbled on this example as an implementor, and found the text contradictory,
+as it seems to imply that the legality of the example is exactly what we want.
+We now have the correct implementation (I hope!) and I just wanted to prevent
+the coming mob of other implementors from stumbling on the same confusion.
+Given that the freezing rules are one of the ventricles of the heart of darkness
+(the other being accessibility checks)  I think any improvement in clarity here
+is useful.
+
+****************************************************************
+
+From: Randy Brukardt
+Sent: Tuesday, August 16, 2016  8:40 PM
+
+As previously stated, we NEVER make material changes in AIs that are already WG
+9 approved, we make a new AI instead. And this one is even more frozen given
+that it is part of a Corrigendum. (I sometimes fix typos or make formatting
+changes in approved AIs, but I try to avoid anything that could even slightly
+change the meaning of the AI.)
+
+I'll file this e-mail thread into the AI, which is pretty much the only thing
+possible. If that "mob of implementers" reads the !appendix, they'll see your
+comments. And if not, well they'll find out the error of their ways when they
+run the ACATS.
+
+****************************************************************

Questions? Ask the ACAA Technical Agent