[MPIWG Fortran] BIND(C) attribute of MPI callback functions

N.M. Maclaren nmm1 at cam.ac.uk
Wed Jul 2 07:29:16 CDT 2014


On Jul 2 2014, Bill Long wrote:
>On Jul 2, 2014, at 2:11 AM, Rolf Rabenseifner <rabenseifner at hlrs.de> wrote:
>> 
>> The reason for removal of BIND(C) was simple:
>> Four callbacks contain LOGICAL arguments
>> and we learnt that LOGICAL and BIND(C) does not work together.

I considered an extension, mentioned it, and we discussed it.  The
problem is virtually insoluble, because the semantic models for Fortran
LOGICAL and C truth values are so different, and any attempt to make
them interoperate would be a truly ghastly mess.  There are outstanding
issues that could be changed, but this is not one.

Yes, I know that Fortran 2008 makes LOGICAL(C_BOOL) interoperate with
_Bool, but I regard that as being even more of a mistake than specifying
that INTEGER(C_SIZE_T) interoperates with size_t.  Don't go there;
REALLY don't go there :-(


Regards,
Nick Maclaren.




More information about the mpiwg-fortran mailing list