(j3.2006) Binding label and bind(c) procedure name scopes
Daniel C Chen
cdchen
Mon May 25 15:53:49 EDT 2015
Hello,
Please consider the following cases:
Case 1:
Interface
Subroutine sub() Bind(C, name = "csub")
End
Subroutine csub() Bind(C, name = "sub")
End
End interface
End
Is this code standard conforming? It seems fine to me, but the standard
seems disallow it as 16.3.1p2 [474:13-18]
Case 2:
Module m
Contains
Subroutine sub1()
Interface
Subroutine s() Bind(C, name="csub")
End
End interface
End
Subroutine sub2()
Interface
Subroutine s() Bind(C, name="sub")
End
End interface
End
End module
Is this code legal? Again, it seems fine to me, but it seems disallowed by
the standard at [474:26]
"An entity of the program shall not be identified by more than one binding
label."
Case 3:
Module m
Contains
Subroutine sub1()
Interface
Subroutine s() Bind(C, name="sub")
End
End interface
End
Subroutine sub2()
Interface
Subroutine s() Bind(C, name="sub")
End
End interface
End
End module
A slighly modification from Case 2 that the binding labels are also the
same, and again, Is this code legal?
TIA!
Daniel
XL Fortran Development - IBM Toronto Software Lab
Phone: 905-413-3056
Tie: 969-3056
Email: cdchen at ca.ibm.com
http://www.ibm.com/software/awdtools/fortran/xlfortran
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.j3-fortran.org/pipermail/j3/attachments/20150525/4d64ff07/attachment.html
More information about the J3
mailing list