Implementation of ISO_Fortran_binding.c and .h files

Steve Kargl sgk@troutmask.apl.washington.edu
Sun Apr 15 00:36:00 GMT 2018


On Sat, Apr 14, 2018 at 01:14:38PM -0700, Jerry DeLisle wrote:
> 
> I have a question.  Should the functions in the .c file become part of 
> libgfortran or in a separate library file of their own?

Good question.  The functions seems to be prefixed by CFI_,
so libgfortran would now have additional namespace pollution.
An effort had been made to prefix functions with _gfortran_
or _gfortrani_.  There appears to be two exceptions.  The
backtrace function start with backtrace_.  libgfortran will
also include fallback C99 functions if a target does not
provide them (e.g., round(), roundf(), and roundl()).
These CFI_ functions however would be inaccessible from a
Fortran program (without a bind c name clause).  So, the
namespace pollution isn't too bad.  I suspect that users 
who want/need the CFI_ functions will be doing mixed 
fortran/C language programming.  Might as well put them in
libgfortran.a

Just my $0.02.

-- 
Steve



More information about the Fortran mailing list