From 4da2b96035b3922ac9421ac0dec9a975049c91d3 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Sat, 29 Nov 2003 22:49:46 +0000 Subject: [PATCH] fstream.tcc (underflow): Minor tweaks in preparation for libstdc++/13217. 2003-11-29 Paolo Carlini * include/bits/fstream.tcc (underflow): Minor tweaks in preparation for libstdc++/13217. From-SVN: r74038 --- libstdc++-v3/ChangeLog | 5 +++++ libstdc++-v3/include/bits/fstream.tcc | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 5e7d21f..931002bf 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,10 @@ 2003-11-29 Paolo Carlini + * include/bits/fstream.tcc (underflow): Minor tweaks in + preparation for libstdc++/13217. + +2003-11-29 Paolo Carlini + * testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc: Tweak for a few small problems (fix timings, use VERIFY..) diff --git a/libstdc++-v3/include/bits/fstream.tcc b/libstdc++-v3/include/bits/fstream.tcc index db46588..fe72183 100644 --- a/libstdc++-v3/include/bits/fstream.tcc +++ b/libstdc++-v3/include/bits/fstream.tcc @@ -286,7 +286,7 @@ namespace std __rlen = 1; } - while (!__got_eof && __ilen == 0); + while (__ilen == 0 && !__got_eof); } if (__ilen > 0) @@ -307,7 +307,7 @@ namespace std 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; -- 2.7.4