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:


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 post / 0 new
For more complete information about compiler optimizations, see our Optimization Notice.