This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fortran Digest 1 Oct 2004 15:52:05 -0000 Issue 268


Folks,

 Is there some way a gnu program to tell which compiler flag (here 
specifically -m32 or -m64)  was used by the program which wrote a given 
fortran unformatted file?  My problem here is that you have to know which 
compiler flag was used by the program writing the file, because a program 
compiled with -m32 cannot read the unformatted i/o written by a program 
compiled -m64.  Is there a magic number or something else which would allow 
you to distinguish between the two?

 Note: this is not a new problem, but the ramifications of this (that I have 
to religously use either -m64 or -m32, and then somehow translate the 
unformatted i/o of one memory model to the other) hadn't hit me yet.  I was 
fixated on the Gnu compilers being incompatible with everyone else, it didn't 
dawn on me that they were incompatible with themselves.

Thanks
Mike


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]