[Patch, Fortran, committed] Fix Fortran bug affecting MinGW-w64, only

Tim Prince n8tm@aol.com
Sat Jul 12 20:01:00 GMT 2014


On 7/12/2014 3:15 PM, Tobias Burnus wrote:
> 64bit Windows is special as "long" is only 32bit wide - while pointers 
> are 64bit and, hence, wider.
>
>
Are you distinguishing MinGW-x64 from other gfortran variants which use 
Windows X64 (e.g. cygwin64?)  This could increase the confusion (which 
Fortran is designed to avoid).  I thought it was clear from the intent 
of cygwin C and C++ to maintain linux compatibility that long there is a 
64-bit data type.  Perhaps if we can be assured that correct usage of 
C_LONG etc. could be counted upon, recognizing that this will change 
KIND among various gfortrans, we will be OK.
Mingw-w64, with its attempts to adopt gcc level support for C99 
(reasonably successful from my point of view), clearly departed from a 
strict Microsoft compatibility model.  Several web references I found 
say that mingw-x64 supports LP64 model.  I don't know of a recognized 
model other than Microsoft's which combines 32-bit long with 64-bit 
pointer.
This is not to say that there aren't ways to write C code which breaks 
between 32-bit and 64-bit gcc, but I don't see that you can count on 
some varieties of 64-bit gcc using 32-bit long, or detect reliably when 
you use such a thing.



More information about the Fortran mailing list