This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: fortran Digest 1 Oct 2004 15:52:05 -0000 Issue 268
- From: Kyon <kyon at verizon dot net>
- To: fortran at gcc dot gnu dot org
- Date: Fri, 1 Oct 2004 12:03:19 -0700
- Subject: Re: fortran Digest 1 Oct 2004 15:52:05 -0000 Issue 268
- Organization: K 9 Bone Admiration Society
- References: <1096645925.20740.ezmlm@gcc.gnu.org>
- Reply-to: kyon at verizon dot net
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