This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/33863] backspace error on i386-pc-mingw32
- From: "jvdelisle at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Nov 2007 21:25:12 -0000
- Subject: [Bug libfortran/33863] backspace error on i386-pc-mingw32
- References: <bug-33863-10129@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from jvdelisle at gcc dot gnu dot org 2007-11-04 21:25 -------
OK, I have taken some time to investigate this. The problem is not MSYS
specific and also occurs with Cygwin.
I do not think we can fix this. Its not a gfortran bug.
The code is attempting to backspace a standard input stream. You can not seek
backwards on an input stream. The code happens to work in some cases because
input buffering happens to still contain the relevant data. Gfortran buffering
hides the stream but you can not rely on it depending on how far you have to
backspace
If I modify the code slightly and open the input file directly, it works
without error. This tels me its not a CR-LF issue. Any other opinions?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33863