[Bug libstdc++/12868] basic_filebuf::imbue fails too easily

cvs-commit at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Tue Nov 18 08:22:00 GMT 2003


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2003-11-18 08:21 -------
Subject: Bug 12868

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	paolo@gcc.gnu.org	2003-11-18 08:21:39

Modified files:
	libstdc++-v3   : ChangeLog 
	libstdc++-v3/include/bits: fstream.tcc 
Added files:
	libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t: 
	                                                          12868.cc 

Log message:
	2003-11-18  Paolo Carlini  <pcarlini@suse.de>
	
	PR libstdc++/12868
	* include/bits/fstream.tcc (imbue): For encodings != -1 it's
	always ok to imbue a new locale, provided seekoff(0, cur, ...)
	doesn't fail, of course.
	(underflow): In order for the above to work, deal gracefully
	with _M_codecvt->in returning codecvt_base::error while
	(__ilen = __iend - this->eback()) > 0: it just means __ilen
	correctly converted internal characters before an error.
	* testsuite/27_io/basic_filebuf/imbue/wchar_t/12868.cc: New.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&r1=1.2090&r2=1.2091
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/fstream.tcc.diff?cvsroot=gcc&r1=1.107&r2=1.108
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/12868.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12868



More information about the Gcc-bugs mailing list