This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/26499] gfortran - End of File incorrectly positioned after binary I/O.
- From: "dir at lanl dot gov" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Mar 2006 17:37:16 -0000
- Subject: [Bug libfortran/26499] gfortran - End of File incorrectly positioned after binary I/O.
- References: <bug-26499-10129@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from dir at lanl dot gov 2006-03-01 17:37 -------
With a sequential access file, the eof is always positioned after the location
of the last write. Thus, a file needs to be truncated to that location when it
is closed, otherwise you are saving data that is beyond the "end of file". On a
sequential tape, an eof mark seperates files and the eoi (end of information)
is usually two consecutive eof marks.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26499