J3/11-135 To: J3 From: Van Snyder Subject: Explicit interface requirement for proc pointer association Date: 2011 January 29 Reference: 10-007r1 1. Summary ---------- Concerning procedure pointer assignment, 7.2.2.4p4 says "If the characteristics of the pointer object or the pointer target are such that an explicit interface is required, both the pointer object and the pointer target shall have an explicit interface." One cannot determine whether the characteristics of a pointer object are such that it requires explicit interface unless it has explicit interface. 12.4.2.2p1(3)(c) is the only one that's even close, but it isn't enough because the non-constant expression for a type parameter value either would necessarily (a) depend upon dummy arguments of the procedure, or (b) depend upon variables accessed by host association. In either case, to determine that, the interface would necessarily have been explicit. If the in the specifies a derived type, and a therein is an expression that is not a constant expression, this just means that the result type of the target has to have the same value for that type parameter. Maybe that parameter of the target's result type has that value, and it's given by a constant expression. Who can tell, unless the target's interface is explicit? Whether the target would be required to have explicit interface where it is referenced depends on its characteristics, not on the pointer object's characteristics. This analysis also applies to the case of reference to an external (non-pointer) procedure declared by a containing a with such a : It's the procedure, not its local declaration that determines whether it is required to have explicit interface where it's referenced. The only requirements we have on explicit interface (12.4.2.2) depend upon the procedure being referenced. The appearance of a procedure as a target in a pointer assignment isn't a reference (at least not according to 1.3.120.4). Therefore, the appearance of the name of a procedure that would require explicit interface where it is referenced, as a target in a pointer assignment, isn't enough to require it to have explicit interface. 2. Edits w.r.t. 10-007r1 ------------------------ [160:9-10 7.2.4.4p4]---------------------------------------------------- Editor: Replace "If ... required" by "If the characteristics of the pointer target are such that it would be required to have explicit interface (12.4.2.2) where it is referenced". Delete second "an" .