> On Jan 11, 2016, at 11:31 AM, Zaak Beekman <[email protected]> wrote: > > > So if I require Fortran 2003 for our fortran codes then this whole ?fortran > name-mangling? thing becomes a moot point, i.e. I do not have to actually > worry about it at all for our project. Just have to keep the C header > consistent with the FORTRAN functions, but that part is on our devs. > > Exactly, that is the whole point of the standardized `ISO_C_BINDING` module > and C interop being added to the Fortran 2003 standard. No more ugly guess > work, hackery, etc. > > AFAIK, there is pretty good support for this among compiler vendors, so long > as you have a recent release.
Even as far back as about five years ago, all 10 compilers surveyed by Ian Chivers and Jane Sleightholme supported C interoperability. And now there are at least four compilers that even support the _additional_ C interoperability features in the draft Fortran 2015 standard: the IBM, Cray, Intel, and GNU compilers. C interoperability appears to be one of the first things every compiler team tackles from a new standard. Anyone with access to ACM Fortran Forum will benefit from consulting the standards-support survey that Ian and Jane have published in almost every issue for roughly a decade or so. Standards support in Fortran compilers is not quite where it needs to be, but it’s much better than it was even just a couple of years ago. Great strides have been taken. > I know for sure GCC's gfortran and Intel's ifort support this very well. I'm > pretty sure PGI, Cray and IBM support it too. I have never used NAG, so I > withhold comment there, but I'd be surprised if they had yet to add this to > their compiler. The demand for C interop is really high, and almost all of > these companies make companion C compilers, so, in my experience, they have > been relatively quick to implement these features, while some other Fortran > 2003 and later features have languished. (I'm looking at you, parameterized > derived types…) PDT is one of the few Fortran 2003 features for which support is still a bit limited, but it is supported by at lest four compilers: IBM, Cray, Intel, and Portland Group, all of which are fully Fortran 2003 compliant. I would bet that NAG will have it soon and GNU will likely have it in their development branch sometime later this year. A developer has already put a great deal of work into scoping out the effort. PDTs are a monster to implement in a compiler. > > P.S. Unless you want to sound like an old geezer, it's spelled Fortran these > days, not FORTRAN. ;-) And the standard has spelled it in mixed case at least since Fortran 90 so, in addition to being dated, spelling FORTRAN in all-caps is non-standard. :D
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
