[Patch] Fix libstdc++/9182
Benjamin Kosnik
bkoz@redhat.com
Fri Mar 7 17:44:00 GMT 2003
2003-03-02 Paolo Carlini <pcarlini@unitus.it>
PR libstdc++/9182
* include/bits/fstream.tcc (_M_really_overflow): Check
for _M_convert_to_external possible failures.
* include/std/std_fstream.h (sync): Check _M_really_overflow
return value and return -1 in case of failure.
* testsuite/27_io/filebuf_virtuals.cc (test13, test14): Add.
* include/bits/fstream.tcc (_M_convert_to_external):
Set __elen to zero if codecvt::out eventually fails.
This looks good, thanks. Please put it in everywhere.
As you both probably noted, error correction for filebuf and codecvt was
very sketchy. This improves things, thanks!
-benjamin
More information about the Libstdc++
mailing list