Is the concept of the Fortran ISO_C_BINDING module also supported by C/C++ compiler vendors? For example, the size of a C/C++ int can vary between the compilers from different vendors. So, with the ISO_C_BINDING module, we know that a Fortran C_INT type is 4 bytes; rather than merely having a kind of 4. But, we still don’t know the size of an int in general in C/C++. Am I correct? Is there perhaps a standard C/C++ ISO_C_BINDING-compatible compiler switch?
Is the concept of the Fortran ISO_C_BINDING module also supported by C/C++ compiler vendors?
Share
As far as I know, the standard only demands matching types in the same toolchain. Thus you are better using the C-Compiler from the same vendor. The standard doesn’t claim anything about the sizes of the C_ kinds, I think.
Edit: Just looked it up in the standard, it is always talking about the companion C-compiler.