[J3] BIND(F)?

Jeff Hammond jehammond at nvidia.com
Fri Jun 24 05:39:24 UTC 2022


One important feature of BIND(C..) is that, because C has an ABI, such interfaces are compiler independent.  Will BIND(F..) have that property or not?  I doubt it.  It sounds like more of a BIND(F_BUT_JUST_MY_COMPILER..) interface.

It seems to me that if one is going to add such a feature, it should be a true implementation of BIND(F..) and allow users to build Fortran DSOs that always work, and not just with the same compiler that created them.  Otherwise, they are not particularly useful as DSOs.

Jeff

From: J3 <j3-bounces at mailman.j3-fortran.org> on behalf of Steve Lionel via J3 <j3 at mailman.j3-fortran.org>
Date: Friday, 24June 2022 at 12:40 AM
To: j3 at mailman.j3-fortran.org <j3 at mailman.j3-fortran.org>
Cc: Steve Lionel <steve at stevelionel.com>
Subject: Re: [J3] BIND(F)?
External email: Use caution opening links or attachments

On 6/23/2022 5:35 PM, Clune, Thomas L. (GSFC-6101) via J3 wrote:
It seems a natural request then to allow a procedure to be declared BIND(F, name=”…”)   The procedure could then even live inside of a module (amusingly allowing the module to have no PUBLIC entities).

Is this unworkable for reasons that I don’t understand?   Low priority?    Or maybe a very small feature that could be put into 202y?
Every compiler I have used has syntax (usually a directive) to specify the global name of a procedure - ALIAS is often the keyword. It does sound like a small but useful feature that could be proposed for 202Y. One might quibble with the syntax suggested, but the basic idea is sound.

Why not post this at https://github.com/j3-fortran/fortran_proposals<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fj3-fortran%2Ffortran_proposals&data=05%7C01%7Cjehammond%40nvidia.com%7Cfd8f74b2329d4386933408da55610376%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C637916172405649146%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=10VecJ16JXBfWOM8Y0g0gMPcOFJ2lSGrBUQaaM6DceI%3D&reserved=0> (if it's not already there)?

Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20220624/4b84d7f5/attachment.htm>


More information about the J3 mailing list