gcc/libstdc++-v3/testsuite/util
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
..
common_type 14340.cc: Abstract list type. 2009-05-20 04:05:21 +00:00
debug libstdc++.exp ([check_v3_target_debug_mode]): Fix so that it really detects when debug mode is activated. 2010-09-03 18:10:46 +00:00
exception remove_freed.cc: Fix test01 return type to void. 2010-08-31 17:24:39 +00:00
hash_fn Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
io Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
native_type Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
performance Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
regression c++config (std::size_t, [...]): Provide typedefs. 2010-06-03 19:15:56 +00:00
statistic Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
thread Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
replacement_memory_operators.h remove_freed.cc: Fix test01 return type to void. 2010-08-31 17:24:39 +00:00
testsuite_abi_check.cc Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
testsuite_abi.cc basic_string.h (front, back): Add. 2010-05-31 14:14:42 +00:00
testsuite_abi.h re PR libstdc++/44417 (make check-target-libstdc++-v3 fails due to undefined ptrdiff_t) 2010-06-08 01:46:10 +00:00
testsuite_allocator.cc Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
testsuite_allocator.h re PR libstdc++/44417 (make check-target-libstdc++-v3 fails due to undefined ptrdiff_t) 2010-06-08 01:46:10 +00:00
testsuite_api.h re PR libstdc++/32618 (std::vector calls uneccessary constructors instead of inplace construction of first object) 2010-06-18 18:07:45 +00:00
testsuite_character.cc Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
testsuite_character.h re PR libstdc++/45628 (std::fstream::tellg invalidates I/O buffer) 2010-09-22 19:40:43 +00:00
testsuite_common_types.h order_statistics_imp.hpp: Avoid -Wall warnings. 2010-06-08 00:45:02 +00:00
testsuite_container_traits.h testsuite_container_traits.h (traits_base): Add has_throwing_erase trait. 2010-03-05 01:51:56 +00:00
testsuite_containers.h array (array): Add pointer and const_pointer typedefs in C++0x mode, per DR 1306. 2010-02-19 18:55:40 +00:00
testsuite_error.h re PR c++/42844 (const variable requires initializer / no explicitly declared default constructor) 2010-04-27 14:56:13 -04:00
testsuite_hooks.cc testsuite_iterators.h: Don't include <cstddef>, don't use NULL, use std::size_t and std::ptrdiff_t. 2010-06-03 23:11:46 +00:00
testsuite_hooks.h [multiple changes] 2010-06-26 20:11:20 +00:00
testsuite_io.h c++config (std::size_t, [...]): Provide typedefs. 2010-06-03 19:15:56 +00:00
testsuite_iterators.h testsuite_iterators.h: Don't include <cstddef>, don't use NULL, use std::size_t and std::ptrdiff_t. 2010-06-03 23:11:46 +00:00
testsuite_performance.h c++config (std::size_t, [...]): Provide typedefs. 2010-06-03 19:15:56 +00:00
testsuite_rng.h Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
testsuite_rvalref.h testsuite_rvalref.h: Remove obsolete macro using _GLIBCXX_TESTSUITE_ALLOW_RVALREF_ALIASING. 2009-09-01 10:19:11 +00:00
testsuite_shared.cc Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
testsuite_tr1.h type_traits (is_nothrow_constructible): Add. 2010-06-10 00:43:50 +00:00