On Wed, Jan 3, 2018 at 8:34 PM, Bob Deen <bob.d...@jpl.nasa.gov> wrote: > 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?
No, it caused regressions on big endian targets, and it was so late in the gcc 7 cycle that there was no time to fix them (at the time I didn't have access to a big endian target to test on, and getting said access took time), so I had to revert it. Those regressions have now been fixed, and the ABI has been broken anyway due to other changes, so I'm trying again for gcc 8. > 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? Yes, I would say so. > (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 > -- Janne Blomqvist