CVS difference for ai05s/ai05-0054-1.txt

Differences between 1.1 and version 1.2
Log of other versions for file ai05s/ai05-0054-1.txt

--- ai05s/ai05-0054-1.txt	2007/05/26 01:44:00	1.1
+++ ai05s/ai05-0054-1.txt	2007/07/26 02:58:06	1.2
@@ -156,6 +156,30 @@
 prefix of an Unchecked_Access attribute to obtain an access-to-variable value,
 then the resulting value is valid only for the lifetime of the variable view
 (which will typically be shorter than the lifetime of the designated object)?
+--- From the minutes and private discussion of the Paris meeting:
+Is there a a way to statically make this illegal? That has problems; any
+such rule would have to be privacy breaking (for instance, making
+declaring constants of types that contain self-references illegal),
+or incompatible (making some self-references illegal). There is one potential
+rule that isnít either: ban constants of limited types, reverting to Ada 95.
+But we donít want to go there.
+Moreover, static checks could not detect all cases, such as a self-reference
+created during an Initialize routine. Note that the proposed run-time check
+doesn't detect this case, either, yet it has the same effect as a direct
+self-reference. (Indeed, this is how the self-references in Claw work; we
+didn't have the X'Access of a type implemented when we started Claw.) Such
+self-references can be perfectly safe (even if they use 'Unchecked_Access),
+because the Finalize routine can destroy all uses of them (again, this is
+how Claw works). A solution which made such self-references illegal would not
+be acceptable (because of incompatibility), and leaving them erroneous seems
+bad for the reasons given above. It doesn't seem to help to catch this problem
+in one case and leave a very similar case undetected. (Especially as that would
+result in a situation much like the redefinition of "=" in Ada 83; you could do
+it, but only if you jumped through a bunch of hoops. What's the point of that?)
 !ACATS test

Questions? Ask the ACAA Technical Agent