On Fri, May 4, 2018 at 9:31 AM, Janne Blomqvist <blomqvist.ja...@gmail.com> wrote:
> On Fri, May 4, 2018 at 9:22 AM, Bert Wesarg <bert.wes...@googlemail.com> > wrote: > >> Hi, >> >> On Wed, May 2, 2018 at 2:15 PM, Jakub Jelinek <ja...@redhat.com> wrote: >> > Some code that compiled successfully with older GCC versions might >> require >> > source changes, see http://gcc.gnu.org/gcc-8/porting_to.html for >> > details. >> >> in "Fortran language issues" it reads: "Prior to GCC 7", shouldn't >> that be "Prior to GCC 8" or "Up to GCC 7"? >> > > Yes, indeed it should. Thanks for noticing. > > >> >> And can somebody can tell me, whether this Fortran issue effects also >> Fortran code which calls C functions? >> >> > If it's a "normal" C function with NULL-terminated strings, then no. If > it's a C function which is designed to follow the Fortran procedure ABI > (where strings are passed as a pointer + a hidden length argument), then > yes. > > > > -- > Janne Blomqvist > I committed the following: cvs diff: Diffing . Index: porting_to.html =================================================================== RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-8/porting_to.html,v retrieving revision 1.5 diff -p -u -r1.5 porting_to.html --- porting_to.html 25 Apr 2018 15:46:36 -0000 1.5 +++ porting_to.html 4 May 2018 06:34:31 -0000 @@ -167,12 +167,12 @@ In member function 'bool B<T>::f() Character lengths are now handled as an <code>INTEGER(kind=C_SIZE_T)</code> variable whose size is dependent on the target system, allowing characters longer than - 2**31 on 64-bit targets. Prior to GCC 7, the character length was + 2**31 on 64-bit targets. Prior to GCC 8, the character length was an <code>INTEGER(kind=4)</code> variable on all targets. If calling - a Fortran procedure with character arguments from C without using - the standard ISO_C_BINDING feature, the hidden character length - argument at the end of the argument list must thus be modified to be - of type <code>size_t</code> rather than of + a Fortran procedure with character arguments from C (or vice versa) + without using the standard ISO_C_BINDING feature, the hidden + character length argument at the end of the argument list must thus + be modified to be of type <code>size_t</code> rather than of type <code>int</code>. For instance, calling the Fortran subroutine </p> <pre><code> -- Janne Blomqvist