J3/08-187 To: J3 Subject: Interp F03/0076 From: Van Snyder Date: 2008 May 15 References: 04-007, 08-006Ar1, 08-007r2 1. Introduction This is a whack at interp F03/0076. The outcome proposed here is the same as in the original submission. The answer is worded slightly differently. Edits are proposed to modify Fortran 2008 in the manner suggested in the original submission. 2. Original submission, sans advice to change F2008 ======================================================================== NUMBER: F03/0076 TITLE: Scope of Fortran names of procedures with binding labels KEYWORDS: Interoperability, dummy procedures DEFECT TYPE: STATUS: J3 consideration in progress QUESTION: Is the following conforming: module A interface subroutine CProc() bind(C,name="AnExternalCProcedure") end subroutine end interface end module module B interface subroutine CSub() bind(C,name="AnExternalCProcedure") end subroutine end interface end module ANSWER: No, the fragment is not conforming. The name of an external procedure is a global entity and is required to be unique. That is, the external C procedure AnExternalCProcedure, must be given a unique Fortran name inside a Fortran program. EDITS: None. SUBMITTED BY: Aleksandar Donev HISTORY: 06-107 m175 F03/0076 Submitted ======================================================================== 3. Change (08-007r2) for consideration at m185 In [439: 16.2p1] replace the second "external procedure" with "external procedure for which a binding label is not specified", replace "such global entity" with "such entity" [this is cannonball polishing], and replace "except ... program" with "except that the name of such an entity may be the same as the name of an intrinsic module". {Makes the Fortran name of an external procedure a global identifier only if it doesn't have a binding label.} In [440: 16.3.1p1(1)] append "external procedures for which a binding label is specified," at the end of the item. {Makes the Fortran name of an external procedure a local identifier if it has a binding label.} This is not a problem because a procedure that has a binding label is required to have explicit interface (see 12.4.2.2p1(5)).