gcc/libstdc++-v3/include/bits
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
..
algorithmfwd.h stl_algo.h (shuffle): Change signature consistently with random_shuffle (US 121). 2010-08-11 17:10:04 +00:00
allocator.h re PR libstdc++/42460 (man page errors for generated libstdc++ man pages) 2010-02-04 18:20:34 +00:00
atomic_0.h atomic: Update to N3000. 2009-12-21 19:00:34 +00:00
atomic_2.h atomic: Update to N3000. 2009-12-21 19:00:34 +00:00
atomic_base.h atomic: Update to N3000. 2009-12-21 19:00:34 +00:00
atomicfwd_c.h Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
atomicfwd_cxx.h atomicfwd_cxx.h: Add typedefs to group. 2010-03-01 19:04:23 +00:00
basic_ios.h re PR libstdc++/42460 (man page errors for generated libstdc++ man pages) 2010-02-04 18:20:34 +00:00
basic_ios.tcc Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
basic_string.h functional_hash.h (__hash_base): Add. 2010-09-22 17:50:36 +00:00
basic_string.tcc c++config (std::size_t, [...]): Provide typedefs. 2010-06-03 19:15:56 +00:00
boost_concept_check.h c++config (std::size_t, [...]): Provide typedefs. 2010-06-03 19:15:56 +00:00
c++0x_warning.h faq.xml: Adjust structure for pdf index. 2010-02-25 01:22:57 +00:00
c++config ios_init.cc (ios_base::Init::~Init): Add back semicolon at the end of the _GLIBCXX_SYNCHRONIZATION_HAPPENS* macros... 2010-08-13 11:48:34 +00:00
char_traits.h acinclude.m4 ([GLIBCXX_CHECK_STDIO_MACROS]): Remove. 2010-07-27 10:36:50 +00:00
codecvt.h streambuf: Adjust doxygen group markup. 2010-02-10 05:45:24 +00:00
concept_check.h Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
cpp_type_traits.h re PR libstdc++/45549 (merge is_iterator into iterator_traits) 2010-09-07 22:30:33 +00:00
deque.tcc re PR libstdc++/32618 (std::vector calls uneccessary constructors instead of inplace construction of first object) 2010-06-18 18:07:45 +00:00
forward_list.h forward_list.h (forward_list<>::resize(size_type, value_type)): Fix signature, per LWG 1340. 2010-09-13 16:30:47 +00:00
forward_list.tcc forward_list.h (forward_list<>::resize(size_type, value_type)): Fix signature, per LWG 1340. 2010-09-13 16:30:47 +00:00
fstream.tcc re PR libstdc++/45628 (std::fstream::tellg invalidates I/O buffer) 2010-09-22 19:40:43 +00:00
functexcept.h functional (function::function): Move construct target. 2009-12-15 17:42:47 +00:00
functional_hash.h functional_hash.h (__hash_base): Add. 2010-09-22 17:50:36 +00:00
gslice_array.h Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
gslice.h Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
hashtable_policy.h [multiple changes] 2010-05-20 22:35:49 +00:00
hashtable.h re PR libstdc++/44480 ([C++0x] Linear performance of begin() in unordered associative containers) 2010-08-31 17:39:51 +00:00
indirect_array.h Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
ios_base.h ios_init.cc (ios_base::Init::~Init): Add back semicolon at the end of the _GLIBCXX_SYNCHRONIZATION_HAPPENS* macros... 2010-08-13 11:48:34 +00:00
istream.tcc revert: compatibility.cc: Make C++0x safe, add in explicit casts to bool for stream sentry objects. 2009-09-05 00:18:07 +00:00
list.tcc re PR libstdc++/32618 (std::vector calls uneccessary constructors instead of inplace construction of first object) 2010-06-18 18:07:45 +00:00
locale_classes.h ios_init.cc (ios_base::Init::~Init): Add back semicolon at the end of the _GLIBCXX_SYNCHRONIZATION_HAPPENS* macros... 2010-08-13 11:48:34 +00:00
locale_classes.tcc condition_variable.cc (condition_variable, [...]): Mark throw() 2009-04-18 21:19:18 +00:00
locale_facets_nonio.h c++config (std::size_t, [...]): Provide typedefs. 2010-06-03 19:15:56 +00:00
locale_facets_nonio.tcc c++config (std::size_t, [...]): Provide typedefs. 2010-06-03 19:15:56 +00:00
locale_facets.h c++config (std::size_t, [...]): Provide typedefs. 2010-06-03 19:15:56 +00:00
locale_facets.tcc c++config (std::size_t, [...]): Provide typedefs. 2010-06-03 19:15:56 +00:00
localefwd.h streambuf: Adjust doxygen group markup. 2010-02-10 05:45:24 +00:00
mask_array.h Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
move.h move.h (forward): Reinstate the N2835 version. 2010-08-11 16:55:33 +00:00
ostream_insert.h revert: compatibility.cc: Make C++0x safe, add in explicit casts to bool for stream sentry objects. 2009-09-05 00:18:07 +00:00
ostream.tcc revert: compatibility.cc: Make C++0x safe, add in explicit casts to bool for stream sentry objects. 2009-09-05 00:18:07 +00:00
postypes.h Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
random.h re PR libstdc++/45613 (bits/random.h misses include guards) 2010-09-09 11:23:39 +00:00
random.tcc re PR libstdc++/45613 (bits/random.h misses include guards) 2010-09-09 11:23:39 +00:00
range_access.h [multiple changes] 2010-07-27 17:27:06 +00:00
regex_compiler.h regex_compiler.h: Fix filename in doxygen comment. 2010-07-03 13:35:03 +01:00
regex_constants.h regex_compiler.h: Fix filename in doxygen comment. 2010-07-03 13:35:03 +01:00
regex_cursor.h regex_compiler.h: Trivial formatting / stylistic fixes. 2010-06-27 09:29:25 +00:00
regex_error.h regex_compiler.h: Fix filename in doxygen comment. 2010-07-03 13:35:03 +01:00
regex_grep_matcher.h regex_compiler.h: Fix filename in doxygen comment. 2010-07-03 13:35:03 +01:00
regex_grep_matcher.tcc regex_compiler.h: Fix filename in doxygen comment. 2010-07-03 13:35:03 +01:00
regex_nfa.h Initial regex implementation. 2010-06-25 19:27:16 +00:00
regex_nfa.tcc regex_compiler.h: Fix filename in doxygen comment. 2010-07-03 13:35:03 +01:00
regex.h stl_heap.h: Update markup. 2010-07-08 17:48:12 +00:00
shared_ptr_base.h re PR libstdc++/42925 ([GB 99] Not possible to compare unique_ptr with 0) 2010-08-11 08:49:47 +00:00
shared_ptr.h re PR libstdc++/42925 ([GB 99] Not possible to compare unique_ptr with 0) 2010-08-11 08:49:47 +00:00
slice_array.h Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
sstream.tcc Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
stl_algo.h re PR libstdc++/45488 (lower_bound doesn't really require the iterator parameters to be default constructible) 2010-09-01 22:58:15 +00:00
stl_algobase.h re PR libstdc++/45488 (lower_bound doesn't really require the iterator parameters to be default constructible) 2010-09-01 22:58:15 +00:00
stl_bvector.h functional_hash.h (__hash_base): Add. 2010-09-22 17:50:36 +00:00
stl_construct.h stl_construct.h (_Construct): Change to variadic in C++0x mode, consistently with allocator::construct. 2010-06-16 12:26:24 +00:00
stl_deque.h move.h (forward): Update to N3092. 2010-08-05 07:34:08 +00:00
stl_function.h re PR libstdc++/42460 (man page errors for generated libstdc++ man pages) 2010-02-04 18:20:34 +00:00
stl_heap.h stl_heap.h: Update markup. 2010-07-08 17:48:12 +00:00
stl_iterator_base_funcs.h re PR libstdc++/45549 (merge is_iterator into iterator_traits) 2010-09-07 22:30:33 +00:00
stl_iterator_base_types.h re PR libstdc++/45549 (merge is_iterator into iterator_traits) 2010-09-07 22:30:33 +00:00
stl_iterator.h re PR libstdc++/44963 ([DR 1334] Ambiguous function overload using __gnu_cxx::crope with std::back_inserter in c++0x mode) 2010-08-08 14:54:51 +00:00
stl_list.h move.h (forward): Update to N3092. 2010-08-05 07:34:08 +00:00
stl_map.h move.h (forward): Update to N3092. 2010-08-05 07:34:08 +00:00
stl_multimap.h move.h (forward): Update to N3092. 2010-08-05 07:34:08 +00:00
stl_multiset.h move.h (forward): Update to N3092. 2010-08-05 07:34:08 +00:00
stl_numeric.h PR libstdc++/22634, DR 539 [Ready] 2009-12-11 17:54:37 +00:00
stl_pair.h re PR libstdc++/44487 ([C++0x] pair of references doesn't work) 2010-06-10 10:24:46 +00:00
stl_queue.h re PR libstdc++/45281 (performance/ext/pb_ds/priority_queue_text_modify_down_timing.cc fails at compile time) 2010-08-14 00:09:21 +00:00
stl_raw_storage_iter.h stl_raw_storage_iter.h (raw_storage_iterator<>:: operator=(const _Tp&)): Use std::__addressof. 2010-09-16 17:09:10 +00:00
stl_relops.h Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
stl_set.h move.h (forward): Update to N3092. 2010-08-05 07:34:08 +00:00
stl_stack.h re PR libstdc++/42460 (man page errors for generated libstdc++ man pages) 2010-02-04 18:20:34 +00:00
stl_tempbuf.h stl_construct.h (_Construct): Change to variadic in C++0x mode, consistently with allocator::construct. 2010-06-16 12:26:24 +00:00
stl_tree.h stl_tree.h (erase(iterator), [...]): Remove inline specifier. 2010-06-23 09:50:42 +00:00
stl_uninitialized.h stl_uninitialized.h (__uninitialized_default, [...]): Add. 2010-06-17 08:34:17 +00:00
stl_vector.h move.h (forward): Update to N3092. 2010-08-05 07:34:08 +00:00
stream_iterator.h user.cfg.in: Adjust includes. 2009-11-06 22:15:17 +00:00
streambuf_iterator.h user.cfg.in: Adjust includes. 2009-11-06 22:15:17 +00:00
streambuf.tcc Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
stringfwd.h re PR libstdc++/44014 (no std::string in API documentation) 2010-05-06 20:57:58 +01:00
unique_ptr.h re PR libstdc++/42925 ([GB 99] Not possible to compare unique_ptr with 0) 2010-08-11 08:49:47 +00:00
unordered_map.h hashtable.h (_Hashtable<>::operator=(const _Hashtable&)): Move inline. 2010-08-14 01:00:23 +00:00
unordered_set.h hashtable.h (_Hashtable<>::operator=(const _Hashtable&)): Move inline. 2010-08-14 01:00:23 +00:00
valarray_after.h re PR libstdc++/27340 (valarray uses __cos which may conflict with libm functions) 2010-02-06 20:41:09 +00:00
valarray_array.h stl_uninitialized.h (__uninitialized_default, [...]): Add. 2010-06-17 08:34:17 +00:00
valarray_array.tcc Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
valarray_before.h re PR libstdc++/27340 (valarray uses __cos which may conflict with libm functions) 2010-02-06 20:41:09 +00:00
vector.tcc hash_bytes.cc: New file... 2010-09-13 18:23:56 +00:00