From: Paolo Carlini Date: Sat, 29 Nov 2003 22:49:46 +0000 (+0000) Subject: fstream.tcc (underflow): Minor tweaks in preparation for libstdc++/13217. X-Git-Tag: releases/gcc-3.4.0~2034 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4da2b96035b3922ac9421ac0dec9a975049c91d3;p=thirdparty%2Fgcc.git 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 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 5e7d21f49eff..931002bfa0fe 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +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: diff --git a/libstdc++-v3/include/bits/fstream.tcc b/libstdc++-v3/include/bits/fstream.tcc index db46588d00fa..fe7218373b65 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;