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

Differences between 1.12 and version 1.13
Log of other versions for file ai05s/ai05-0188-1.txt

--- ai05s/ai05-0188-1.txt	2010/11/25 01:35:28	1.12
+++ ai05s/ai05-0188-1.txt	2011/02/01 22:50:24	1.13
@@ -442,7 +442,7 @@
 @fa<qualified_expression> whose @fa<subtype_mark> denotes a static and
 constrained scalar subtype, then each non-@b<others> @fa<discrete_choice>
 shall cover only values in that subtype, and each value of that
-subtype shall be covered by some @fa<discrete_choice> 
+subtype shall be covered by some @fa<discrete_choice>
 (either explicitly or by @b<others>).>
 @dby
 @Xbullet<If the @i<selecting_>@fa<expression> is a @fa<name> (including a
@@ -451,7 +451,7 @@
 @fa<qualified_expression> whose @fa<subtype_mark> denotes a static and
 constrained scalar subtype, then each non-@b<others> @fa<discrete_choice>
 shall cover only values in that subtype, and each value of that
-subtype shall be covered by some @fa<discrete_choice> 
+subtype shall be covered by some @fa<discrete_choice>
 (either explicitly or by @b<others>).>
 
 !corrigendum 5.4(8)
@@ -521,7 +521,7 @@
 If the result subtype of the function is limited, then the @fa<expression> of the
 return statement (if any) shall be an @fa<aggregate>, a function call (or
 equivalent use of an operator), or a @fa<qualified_expression> or parenthesized
-expression whose operand is one of these. 
+expression whose operand is one of these.
 @dby
 If the result subtype of the function is limited, then the
 @fa<expression> of the return statement (if any) shall meet the restrictions
@@ -1095,6 +1095,91 @@
 to If expressions, and all uses of conditional_expression in Legality Rules,
 Static Semantics, and Dynamic Semantics are changed to if_expression. I added
 that.
+
+****************************************************************
+
+From: Steve Baird
+Sent: Friday, March 26, 2010  4:05 PM
+
+If you have a case-expression in a generic package spec which cases on, say, a
+formal in-out object of type Integer, it must cover all the Integer values.
+
+If you then instantiate the generic with an object whose subtype is Natural, I
+don't think we want to see a legality violation upon rechecking the expanded
+spec for the instance.
+
+I think the currently posted wording for the AI would require rejecting such an
+example. Or at least it is unclear what this wording
+   The possible values of the expression shall be
+   covered as for case statements (see 5.4).
+means in this case, because a case statement cannot occur in an expanded
+instance spec.
+
+Do we agree that this needs fixing?
+
+****************************************************************
+
+From: Bob Duff
+Sent: Friday, March 26, 2010  4:20 PM
+
+Yes.
+
+****************************************************************
+
+From: Randy Brukardt
+Sent: Friday, March 26, 2010  6:59 PM
+
+I agree with Bob. The recheck typically used could mean that it would be
+impossible to write a legal generic specification for many objects that might be
+passed to a generic in out parameter. So it seems we need to think about this
+some more.
+
+OTOH, use of generic in out formal parameters is pretty rare. (I don't think
+I've ever used one outside of test programs.) So it isn't the end of the world
+if this is broken. Which means that we don't want a page and a half of new rules
+to deal with this case.
+
+****************************************************************
+
+From: Steve Baird
+Sent: Friday, March 26, 2010  9:08 PM
+
+I think it is just a few words to say that this legality rule doesn't apply in
+an instance spec, along the lines of 8.3(26/2).
+
+****************************************************************
+
+From: Robert Dewar
+Sent: Friday, March 26, 2010  9:18 PM
+
+>> I agree with Bob. ... [but] we don't want a page and a half of new
+>> rules to deal with this case.
+
+especially when we know how we want things to work :-)
+
+****************************************************************
+
+From: Bob Duff
+Sent: Saturday, March 27, 2010  7:24 AM
+
+> OTOH, use of generic in out formal parameters is pretty rare.
+
+They are, but doesn't the same issue arise in other cases, such as formal 'in's,
+and functions (formal or not) returning a formal subtype?
+
+****************************************************************
+
+From: Steve Baird
+Sent: Saturday, March 27, 2010  7:42 AM
+
+... and formal functions returning non-formal subtypes .
+
+****************************************************************
+
+From: Bob Duff
+Sent: Saturday, March 27, 2010  7:56 AM
+
+Oh, yeah, I had forgotten those aren't required to match (yuck).
 
 ****************************************************************
 

Questions? Ask the ACAA Technical Agent