CVS difference for ais/ai-00149.txt

Differences between 1.2 and version 1.3
Log of other versions for file ais/ai-00149.txt

--- ais/ai-00149.txt	2000/05/17 20:49:06	1.2
+++ ais/ai-00149.txt	2000/10/05 02:47:30	1.3
@@ -1,4 +1,4 @@
-!standard 08.06    (12)                               00-05-11  AI95-00149/03
+!standard 08.06    (12)                               00-10-04  AI95-00149/04
 !class confirmation 96-09-04
 !status received 96-09-04
 !priority Low
@@ -924,5 +924,117 @@
 
 The answer is at A.1(49), after the definition of Standard; this also
 answers the question for hyphen and soft hyphen.
+
+****************************************************************
+
+From: srolsen@COLLINS.ROCKWELL.COM
+Sent: Friday, September 22, 2000 8:17 PM
+
+Description:
+
+In procedure P, Q'Address could presumably refer to procedure Try_Ap.Q,
+package Try_Ap_P1.Q, or the two Try_Ap_P2.Q procedures.
+
+Here is the sample code:
+
+   package Try_Ap_P1 is
+   end Try_Ap_P1;
+
+   package Try_Ap_P1.Q is
+     procedure Q;
+   end Try_Ap_P1.Q;
+
+   package Try_Ap_P2 is
+     procedure Q (A : Integer);
+     procedure Q (A : Float);
+   end Try_Ap_P2;
+
+   with System;
+   with Try_Ap_P1.Q;
+   with Try_Ap_P2;
+
+   package body Try_Ap is
+
+     use Try_Ap_P1;
+     use Try_Ap_P2;
+
+     procedure Q is
+     begin
+       null;
+     end Q;
+
+     procedure P is
+       A : System.Address;
+     begin
+       A := Q'Address;
+     end P;
+
+   end Try_Ap;
+
+Desired response:
+
+Which address will be assigned to A, the address of Try_Ap.Q, Try_Ap_P1.Q,
+or one of the Q procedures in Try_Ap_P2?
+
+What is the "rule" for selecting the procedure?
+
+Is it correct to issue an error message or warning when this code is
+compiled?  Please explain your answer.  Thank you.
+
+****************************************************************
+
+From: Tucker Taft
+Sent: Friday, September 22, 2000 10:12 PM
+
+> Which address will be assigned to A, the address of Try_Ap.Q, Try_Ap_P1.Q,
+> or one of the Q procedures in Try_Ap_P2?
+
+Try_Ap.Q.
+
+> What is the "rule" for selecting the procedure?
+
+The other Q's are not use-visible, because one is non-overloadable
+and one is overloadable, so they "cancel out" as specified in 8.4(11).
+
+> Is it correct to issue an error message or warning when this code is
+> compiled?
+
+It is not correct to issue an error message.  There are no rules about
+issuing warnings -- compilers can pretty much do whatever they
+want when it comes to warnings.
+
+> Please explain your answer.  Thank you.
+
+There is only one Q visible, so there is no ambiguity.  This is
+because the multiple potentially use-visible Q's are not all overloadable,
+so none of them are actually use-visible.
+
+****************************************************************
+
+From: Robert Dewar
+Sent: Friday, September 22, 2000 10:09 PM
+
+I agree with Tuck, this is a clear case.
+
+****************************************************************
+
+From: Robert A Duff
+Sent: Saturday, September 23, 2000 2:28 PM
+
+> There is only one Q visible, so there is no ambiguity.  This is
+> because the multiple potentially use-visible Q's are not all overloadable,
+> so none of them are actually use-visible.
+
+Right, but one might wonder what Q'Address does when Q *is* overloaded
+(eg if the package were removed from the example).
+The answer is that the normal overload resolution rules apply: it's
+ambiguous.  See 8.6.
+
+****************************************************************
+
+From: Erhard Ploedereder
+Sent: Monday, September 25, 2000 3:10 AM
+
+I agree. (And this is not worth an AI, since it is clear from the RM.)
 
 ****************************************************************

Questions? Ask the ACAA Technical Agent