On 12/29/17 5:31 AM, Janne Blomqvist wrote:
In order to handle large character lengths on (L)LP64 targets, switch
the GFortran character length from an int to a size_t.
This is an ABI change, as procedures with character arguments take
hidden arguments with the character length.
Did this change not make it into gcc 7 then? I am one of those who
still use these hidden arguments for Fortran <-> C interfaces. Based on
discussions a year ago, I added this to my code:
#if defined(__GNUC__) && (__GNUC__ > 6)
#include <stddef.h>
#define FORSTR_STDARG_TYPE size_t
#else
#define FORSTR_STDARG_TYPE int
#endif
I infer from this thread that I should change this to __GNUC__ > 7 now.
Is this still the correct/best way to determine the hidden argument size?
(note that we're still using 4.x... ugh, don't ask... so the >6 check
hasn't actually been used yet, I just want to future-proof things as
much as possible without having to rewrite the entire Fortran <-> C
interface.)
Thanks...
-Bob
Bob Deen @ NASA-JPL Multmission Image Processing Lab
bob.d...@jpl.nasa.gov