(j3.2006) Interop observation
Keith Bierman
khbkhb
Mon Feb 6 18:15:54 EST 2012
Obviously highly platform dependent. But unix flavored environments are common enough that a note wouldn't be unreasonable (IMNSO )
Sent from my iPad
On Feb 6, 2012, at 4:07 PM, Van Snyder <Van.Snyder at jpl.nasa.gov> wrote:
> A colleague has observed that it's not terribly difficult to construct a
> duplicate definition using interop features.
>
> The example was
>
> SUBROUTINE AnyNamesubf(i)BIND(C,NAME="csubf_")
> USE, INTRINSIC :: iso_c_binding, ONLY: c_int
>
> INTEGER(c_int) :: i
> CALL Csubf(i)
> END SUBROUTINE AnyNamesubf
>
> where Csubf was a non-interoperable Fortran external subroutine.
>
> I don't think this is a normative issue for the standard, but should we
> put a note somewhere that might help people not create these? Maybe
> something like advising not to give binding names to Fortran procedures
> that are all lower case (or all upper case) and are sufficiently similar
> to the external names of non-interoperable Fortran external procedures
> that the linker might be sent the same name for both of them.
>
>
> _______________________________________________
> J3 mailing list
> J3 at j3-fortran.org
> http://j3-fortran.org/mailman/listinfo/j3IMNS
More information about the J3
mailing list