Calling-convention extensions for F2003?

Calling-convention extensions for F2003?

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?

1 envío / 0 nuevos
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.