gcc/libstdc++-v3/testsuite/27_io
David Krauss 3531cf5ef3 re PR libstdc++/45628 (std::fstream::tellg invalidates I/O buffer)
2010-09-22  David Krauss  <potswa@mac.com>

	PR libstdc++/45628
	* include/bits/fstream.tcc (basic_filebuf::underflow): Add state
	transition to avoid modality requiring seekoff(0,ios::cur).
	(basic_filebuf::pbackfail): Likewise.
	(basic_filebuf::overflow): Likewise.
	(basic_filebuf::_M_seek): Avoid minor unnecessary conversion.
	(basic_filebuf::seekoff): Remove code to _M_get_ext_pos; make
	(0, ios::cur) a special case preserving buffer contents.
	(basic_filebuf::_M_get_ext_pos): New function to obtain status
	about codecvt extern_t buffer for overflow and seekoff.
	* include/std/fstream (basic_filebuf::_M_get_ext_pos): Likewise.
	* config/abi/pre/gnu.ver: Export new symbols.
	* testsuite/27_io/basic_filebuf/seekoff/char/45628-1.cc: New,
	verifies that seekoff(0, ios::cur) preserves buffers.
	* testsuite/27_io/basic_filebuf/seekoff/char/45628-2.cc: Likewise.
	for codecvt case. More lenient as it may still flush put area.
	* testsuite/27_io/basic_filebuf/seekoff/char/4.cc: Modify to
	check that seekoff is not required between read and write.
	* testsuite/27_io/basic_filebuf/seekoff/wchar_t/4.cc: Likewise.
	* testsuite/27_io/basic_filebuf/sync/wchar_t/1.cc: Remove.
	* testsuite/27_io/basic_filebuf/sync/wchar_t/1.cc: Likewise.
	* testsuite/util/testsuite_character.h (codecvt::do_length): Comply
	with 22.2.1.5.2/10 "Returns ... the LARGEST value in the range..."

From-SVN: r164529
2010-09-22 19:40:43 +00:00
..
basic_filebuf re PR libstdc++/45628 (std::fstream::tellg invalidates I/O buffer) 2010-09-22 19:40:43 +00:00
basic_fstream
basic_ifstream
basic_ios [multiple changes] 2010-09-15 10:46:39 +00:00
basic_iostream
basic_istream 14220.cc: XFAIL on Solaris 9/x86, 32-bit Solaris 10/x86 and 64-bit Solaris 10/SPARC. 2010-07-26 20:54:57 +00:00
basic_istringstream
basic_ofstream
basic_ostream [multiple changes] 2010-09-15 10:46:39 +00:00
basic_ostringstream order_statistics_imp.hpp: Avoid -Wall warnings. 2010-06-08 00:45:02 +00:00
basic_streambuf [multiple changes] 2010-09-15 10:46:39 +00:00
basic_stringbuf [multiple changes] 2010-09-15 10:46:39 +00:00
basic_stringstream
fpos order_statistics_imp.hpp: Avoid -Wall warnings. 2010-06-08 00:45:02 +00:00
headers libstdc++.exp: Set additional_prunes. 2010-06-15 17:05:22 -04:00
ios_base c++config (_GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE, [...]): Add. 2010-08-12 22:56:59 +00:00
manipulators [multiple changes] 2010-09-15 10:46:39 +00:00
objects [multiple changes] 2010-09-15 10:46:39 +00:00
types order_statistics_imp.hpp: Avoid -Wall warnings. 2010-06-08 00:45:02 +00:00
rvalue_streams.cc