- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It would be nice if ISO_C_BINDING could replace the !DEC$ directives involved in C binding. One obvious missing feature is the ability to define a calling convention other than the standard cdecl. This is mainly an issue for Win32 platforms, because it does not follow ISO C conventions. It also seems that Fortran Standards members do not have a big interest in adding non-ISO-C support.
Instead of having to continue using !DEC$ directives, I think that a useful extension would be to have additional attributes in the BIND(C) statement, which could conform to the __attribute__(()) directives of the underlying C platform, for example:
SUBROUTINE cfunc() BIND(C,NAME="dlopen",STDCALL)
That syntax makes a lot of sense to me. Does this idea look useful to the Intel Fotran developers? Is it worth trying to propose during the upcoming F2008 comment period?
Instead of having to continue using !DEC$ directives, I think that a useful extension would be to have additional attributes in the BIND(C) statement, which could conform to the __attribute__(()) directives of the underlying C platform, for example:
SUBROUTINE cfunc() BIND(C,NAME="dlopen",STDCALL)
That syntax makes a lot of sense to me. Does this idea look useful to the Intel Fotran developers? Is it worth trying to propose during the upcoming F2008 comment period?
Link Copied
0 Replies

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page