This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[v3] Minor tweaks to basic_filebuf::underflow
- From: Paolo Carlini <pcarlini at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 29 Nov 2003 23:52:34 +0100
- Subject: [v3] Minor tweaks to basic_filebuf::underflow
Hi,
the Changelog entry says it all.
Tested x86-linux, committed.
Paolo.
///////////
2003-11-29 Paolo Carlini <pcarlini@suse.de>
* include/bits/fstream.tcc (underflow): Minor tweaks in
preparation for libstdc++/13217.
diff -urN libstdc++-v3-orig/include/bits/fstream.tcc libstdc++-v3/include/bits/fstream.tcc
--- libstdc++-v3-orig/include/bits/fstream.tcc 2003-11-28 10:34:30.000000000 +0100
+++ libstdc++-v3/include/bits/fstream.tcc 2003-11-29 23:29:31.000000000 +0100
@@ -286,7 +286,7 @@
__rlen = 1;
}
- while (!__got_eof && __ilen == 0);
+ while (__ilen == 0 && !__got_eof);
}
if (__ilen > 0)
@@ -307,7 +307,7 @@
if (__r == codecvt_base::partial)
__throw_ios_failure("incomplete character in file");
}
- else if (__r == codecvt_base::error)
+ else
__throw_ios_failure("invalid byte sequence in file");
}
return __ret;