This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/23262] [migwin32] rewind truncates file
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Sep 2005 08:46:03 -0000
- Subject: [Bug libfortran/23262] [migwin32] rewind truncates file
- References: <20050806194600.23262.fxcoudert@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From fxcoudert at gcc dot gnu dot org 2005-09-03 08:46 -------
Well, that was not so difficult: when we write "1234\n6789\n" for example, the
length of the write is 10. But the size of the resulting file is 12, since each
newline character is translated into a two-byte \n\r sequence! Then, the first
step of the rewind is to truncate the file to length 10.
I don't know exactly how we should handle this :(
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-09-03 08:46:02
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23262