Commit Graph

2336 Commits

Author SHA1 Message Date
Paolo Carlini 7bb9b33b3b basic_string.h (_M_replace_safe): Change signatures to take size_types and const _CharT*.
2004-01-22  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/basic_string.h (_M_replace_safe): Change
	signatures to take size_types and const _CharT*.
	(_M_replace_aux): Likewise, takes size_types instead of
	iterators.
	(append(size_type, _CharT)): Update call.
	(assign(size_type, _CharT)): Ditto.
	(replace(iterator, iterator, size_type, _CharT)): Ditto.
	(_M_replace_dispatch(iterator, iterator, _Integer,
	_Integer, __true_type)): Ditto.
	* include/bits/basic_string.tcc (assign(const _CharT*,
	size_type)): Ditto.
	(insert(size_type, const _CharT*, size_type)): Ditto.
	(replace(size_type, size_type, const _CharT*,
	size_type)): Ditto.
	(_M_replace(iterator, iterator, _InputIterator,
	_InputIterator)): Ditto.
	(append(const basic_string&)): Ditto.
	(append(const basic_string&, size_type, size_type): Ditto.
	(append(const _CharT*, size_type): Ditto.
	(_M_replace_safe, _M_replace_safe): Change definitions
	accordingly, simplify.
	* string-inst.cc (_M_replace_safe): Don't instantiate.

From-SVN: r76353
2004-01-22 12:46:28 +00:00
Paolo Carlini 3e7782b2f8 basic_string.tcc (append(const basic_string&)): Revert previous change.
2004-01-21  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/basic_string.tcc (append(const basic_string&)):
	Revert previous change.
	(append(const basic_string&, size_type, size_type)): Revert
	previous change, use _M_check and _M_limit.

From-SVN: r76282
2004-01-21 15:43:45 +00:00
Paolo Carlini e03a6fb7b6 basic_string.h (_M_check): Change to return a checked __pos and take an additional const char* argument.
2004-01-21  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/basic_string.h (_M_check): Change to return
	a checked __pos and take an additional const char* argument.
	(_M_fold): Rename to _M_limit, change to return a size_type,
	corresponding to the __off limited to the actual length.
	(insert(size_type, size_type, _CharT)): Update call, call
	replace.
	(insert(iterator, _CharT)): Call replace(iterator, iterator,
	size_type, _CharT) instead.
	(erase(size_type, size_type)): Update calls.
	(replace(size_type, size_type, size_type, _CharT)): Ditto.
	(substr(size_type, size_type)): Use _M_check.
	* include/bits/basic_string.tcc (basic_string(const basic_string&,
	size_type, size_type)): Update calls.
	(basic_string(const basic_string&, size_type, size_type,
	const _Alloc&)): Ditto.
	(assign(const basic_string&, size_type, size_type)): Use the
	new _M_check and _M_limit.
	(insert(size_type, const basic_string&, size_type, size_type):
	Ditto.
	(insert(size_type, const _CharT*, size_type)): Ditto.
	(replace(size_type, size_type, const _CharT*, size_type): Ditto.
	(replace(size_type, size_type, const basic_string&,
	size_type, size_type)): Ditto.
	(append(const basic_string&)): Ditto.
	(append(const basic_string&, size_type, size_type)): Ditto.
	(copy(_CharT*, size_type, size_type)): Ditto.
	(compare(size_type, size_type, const basic_string&)): Ditto.
	(compare(size_type, size_type, const basic_string&,size_type,
	size_type)): Ditto.
	(compare(size_type, size_type, const _CharT*)): Ditto.
	(compare(size_type, size_type, const _CharT*, size_type)): Ditto.

From-SVN: r76274
2004-01-21 11:29:51 +00:00
Stefan Olsson cec73eb50c mt_allocator.h: If a thread...
2004-01-19  Stefan Olsson  <stefan@snon.net>

	* include/ext/mt_allocator.h: If a thread, when it dies, still has
	memory on it's freelist this memory is not returned to global
	list. Simplification of deallocate so that memory is always
	returned to the calling thread id's freelist instead of to
	global. Fix typos. Add volatile where appropriate.

From-SVN: r76200
2004-01-20 06:35:21 +00:00
Loren J. Rittle 87d11ccc82 10063-2.cc: Treat unbuffered.
* testsuite/ext/stdio_filebuf/char/10063-2.cc: Treat unbuffered.
	* testsuite/ext/stdio_filebuf/char/10063-3.cc: New test.  Like -2 but
	use __gnu_cxx::stdio_sync_filebuf<char> instead; allow buffered stream.

From-SVN: r76191
2004-01-20 01:30:03 +00:00
Paolo Carlini f18be892cb debug.cc: Make sure all the names are prefixed with double (or single) underscore.
2004-01-19  Paolo Carlini  <pcarlini@suse.de>

	* src/debug.cc: Make sure all the names are prefixed with
	double (or single) underscore.

From-SVN: r76163
2004-01-19 18:10:55 +00:00
Paolo Carlini 33d4e9b26c debug.cc: Trivial formatting change.
2004-01-19  Paolo Carlini  <pcarlini@suse.de>

	* src/debug.cc: Trivial formatting change.

From-SVN: r76147
2004-01-19 12:11:50 +00:00
Paolo Carlini 954b12d2dc basic_string.tcc (_S_construct(size_type, _CharT, const _Alloc&)): Remove redundant try/catch.
2004-01-19  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/basic_string.tcc (_S_construct(size_type,
	_CharT, const _Alloc&)): Remove redundant try/catch.
	(_M_mutate(size_type, size_type, size_type)): Ditto.
	(_M_clone(const _Alloc&, size_type)): Ditto.

From-SVN: r76141
2004-01-19 08:53:32 +00:00
Paolo Carlini bbad4221ec 2004-01-18 Paolo Carlini <pcarlini@suse.de>
* ChangeLog rotation.

From-SVN: r76093
2004-01-18 11:18:29 +00:00
Paolo Carlini acbab5bf1c basic_string.h (c_str()): Simplify, due to 21.3.4 the internal representation is always kept null-terminated.
2004-01-18  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/basic_string.h (c_str()): Simplify, due to
	21.3.4 the internal representation is always kept null-terminated.
	* include/bits/basic_string.tcc (_M_clone): Null-terminate.
	* testsuite/21_strings/basic_string/element_access/char/4.cc: New.
	* testsuite/21_strings/basic_string/element_access/wchar_t/4.cc: Ditto.

From-SVN: r76092
2004-01-18 10:51:13 +00:00
Paolo Carlini 9c96a6896b basic_string.h (append(size_type, _CharT)): Moved inline...
2004-01-18  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/basic_string.h (append(size_type, _CharT)):
	Moved inline, just call _M_replace_aux, no source iterators at
	risk of being clobbered.
	(assign(size_type, _CharT)): Call directly _M_replace_aux.
	(_M_replace(iterator, iterator, _InputIterator, _InputIterator,
	input_iterator_tag)): Remove fifth unused argument.
	(_M_replace_dispatch(iterator, iterator, _InputIterator,
	_InputIterator, __false_type)): Update call.
	* include/bits/basic_string.tcc (replace(size_type, size_type,
	const _CharT*, size_type)): Update call.
	(_M_replace_aux(iterator, iterator, size_type, _CharT)): Tweak
	throw string literal.
	(_M_replace_safe(iterator, iterator, _ForwardIterator,
	_ForwardIterator)): Likewise.
	(_M_replace(iterator, iterator, _InputIterator, _InputIterator,
	input_iterator_tag)): Remove fifth unused argument.
	(append(size_type __n, _CharT __c)): Move inline.
	* src/string-inst.cc (S::_M_replace(S::iterator, S::iterator,
	const C*, const C*, input_iterator_tag)): Remove fifth unused
	argument.

From-SVN: r76091
2004-01-18 09:54:46 +00:00
Benjamin Kosnik d517f626e1 13189.cc: Fix guards.
2004-01-16  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/ext/enc_filebuf/char/13189.cc: Fix guards.
	* testsuite/ext/enc_filebuf/wchar_t/13189.cc: Same.

From-SVN: r76017
2004-01-17 00:51:35 +00:00
Danny Smith 701b701b54 testsuite_hooks.cc (try_mkfifo): Avoid calling mkfifo for mingw32.
2004-01-16  Danny Smith  <dannysmith@users.sourceforge.net>

	* testsuite/testsuite_hooks.cc (try_mkfifo): Avoid calling
	mkfifo for mingw32.

From-SVN: r75963
2004-01-16 08:43:45 +00:00
Stefan Olsson 2913770f6f mt_allocator.h: Reuse thread id's as soon as possible by changing the behaviour of...
2004-01-15  Stefan Olsson  <stefan@snon.net>

	* include/ext/mt_allocator.h: Reuse thread id's as soon as
	possible by changing the behaviour of thread_freelist to do
	push_front when threads die instead of push_back.

From-SVN: r75939
2004-01-15 19:18:35 +00:00
Paolo Carlini 47f62b27c8 locale_facets.h (struct __numpunct_cache): Add member _M_grouping_size, caching the length of _M_grouping.
2004-01-14  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.h (struct __numpunct_cache):
	Add member _M_grouping_size, caching the length of _M_grouping.
	(__numpunct_cache<>::_M_cache): Assign the latter.
	(__verify_grouping): Move declaration...
	* include/bits/locale_facets.tcc (__verify_grouping):
	... here, change signature to take a const char* and a size_t
	for the grouping; not a template anymore.
	(__add_grouping, num_put::_M_group_int, num_put::_M_group_float):
	Likewise change signature and tweak consistently.
	(num_get::_M_extract_float, num_get::_M_extract_int,
	num_put::_M_insert_int, num_put::_M_insert_float,
	money_get::do_get(string_type&), money_get::do_put(string_type)):
	Update callers.
	* config/locale/generic/numeric_members.cc
	(numpunct<>::_M_initialize_numpunct): Assign the new member.
	* config/locale/gnu/numeric_members.cc
	(numpunct<>::_M_initialize_numpunct): Likewise.
	* src/locale-inst.cc (__add_grouping): Tweak signature.
	(__verify_grouping): Don't instantiate, not a template anymore.

	* include/bits/locale_facets.h: Rename _M_truename_len ->
	_M_truename_size, _M_falsename_len -> _M_falsename_size.
	* include/bits/locale_facets.tcc: Likewise.
	* config/locale/generic/numeric_members.cc: Likewise.
	* config/locale/gnu/numeric_members.cc: Likewise.

From-SVN: r75876
2004-01-14 19:14:39 +00:00
Stefan Olsson 41f2472503 mt_allocator.h: Fixups.
2004-01-14  Stefan Olsson  <stefan@snon.net>

	* include/ext/mt_allocator.h: Fixups.
	* testsuite/performance/allocator.cc: Enable __mt_alloc tests.
	* testsuite/performance/allocator_thread.cc: Same.

From-SVN: r75875
2004-01-14 18:54:18 +00:00
Benjamin Kosnik 070ce57b95 ifstream_extract_float.cc: Add higher precision tests.
2
2004-01-13  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/performance/ifstream_extract_float.cc: Add higher
	precision tests.
	* testsuite/performance/ofstream_insert_float.cc: Same.

From-SVN: r75841
2004-01-14 04:11:57 +00:00
Paolo Carlini c951359074 locale-misc-inst.cc (__convert_from_v(long), [...]): Remove, unused.
2004-01-13  Paolo Carlini  <pcarlini@suse.de>

	* src/locale-misc-inst.cc (__convert_from_v(long),
	__convert_from_v(unsigned long), __convert_from_v(long long),
	__convert_from_v(unsigned long long)): Remove, unused.

From-SVN: r75822
2004-01-13 23:25:55 +00:00
Benjamin Kosnik 60af005f4b ifstream_extract_float.cc: New.
2004-01-13  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/performance/ifstream_extract_float.cc: New.
	* testsuite/performance/ofstream_insert_float.cc: Float generation
	matches above.

	* 20_util/auto_ptr.cc, auto_ptr_neg.cc: Break into...
	* 20_util/auto_ptr/1.cc: ...this.
	* 20_util/auto_ptr/2.cc: Same.
	* 20_util/auto_ptr/3.cc: Same.
	* 20_util/auto_ptr/3946.cc: Same.
	* 20_util/auto_ptr/4.cc: Same.
	* 20_util/auto_ptr/5.cc: Same.
	* 20_util/auto_ptr/6.cc: Same.
	* 20_util/auto_ptr/7.cc: Same.
	* 20_util/auto_ptr/assign_neg.cc
	* 20_util/pairs.cc: Break into...
	* 20_util/pair/1.cc: ...this.
	* 20_util/pair/2.cc: Same.
	* 20_util/pair/3.cc: Same.
	* 20_util/pair/4.cc: Same.

From-SVN: r75811
2004-01-13 18:57:45 +00:00
Paolo Carlini d8ef7deccb locale_facets.tcc (num_get::do_get(void*&)): Set correctly just basefield, the only group that matters.
2004-01-13  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (num_get::do_get(void*&)):
	Set correctly just basefield, the only group that matters.

From-SVN: r75810
2004-01-13 18:53:57 +00:00
Paolo Carlini 5640461d2f rope (_Rope_rep_alloc_base): Eliminate.
2004-01-13  Paolo Carlini  <pcarlini@suse.de>

	* include/ext/rope (_Rope_rep_alloc_base): Eliminate.
	(_Rope_rep_base): Inherit directly from the rope allocator;
	use rebinding instead of _Alloc_traits; pick up data member
	from _Rope_rep_alloc_base.
	(_Rope_alloc_base): Eliminate.
	(_Rope_base): Inherit directly from the rope allocator; use
	rebinding instead of _Alloc_traits; pick up data member from
	_Rope_alloc_base.
	(rope::_S_new_RopeLeaf, rope::_S_new_RopeConcatenation,
	rope::_S_new_RopeFunction, rope::_S_new_RopeSubstring): Tweak.

From-SVN: r75800
2004-01-13 11:46:50 +00:00
Paolo Carlini 95c9624ff5 re PR libstdc++/13650 (string::compare should not (always) use traits_type::length())
2004-01-13  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/13650
	* include/bits/basic_string.tcc (compare(size_type, size_type,
	const _CharT*, size_type)): Implement correctly the resolution
	of DR 5: basically, s is a char array, -not- a C string.
	* include/bits/basic_string.h: Tweak some comments.
	* testsuite/21_strings/basic_string/compare/char/13650.cc: New.
	* testsuite/21_strings/basic_string/compare/wchar_t/13650.cc: New.

From-SVN: r75798
2004-01-13 11:12:38 +00:00
Andreas Tobler c91de77a9d libstdc++.exp: Set LD_LIBRARY_PATH_32 for Solaris.
2004-01-10  Andreas Tobler  <a.tobler@schweiz.ch>

	* testsuite/lib/libstdc++.exp: Set LD_LIBRARY_PATH_32 for
	Solaris.

From-SVN: r75759
2004-01-12 21:47:44 +01:00
Paolo Carlini 300b3317f3 13582-2.cc: Use try_mkfifo.
2004-01-12  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/27_io/basic_filebuf/imbue/char/13582-2.cc:
	Use try_mkfifo.
	* testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-2.cc:
	Likewise.

From-SVN: r75738
2004-01-12 17:25:25 +00:00
Paolo Carlini dc6798f865 locale_facets.h (struct __numpunct_cache): Add members _M_truename_len and _M_falsename_len...
2004-01-12  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.h (struct __numpunct_cache):
	Add members _M_truename_len and _M_falsename_len, caching
	the lengths of _M_truename and _M_falsename.
	(__numpunct_cache<>::_M_cache): Assign the latter.
	* include/bits/locale_facets.tcc (num_get::do_get(bool&),
	num_put::do_put(bool)): Use the new members, thus avoiding
	computing string lengths again and again.
	* config/locale/generic/numeric_members.cc
	(numpunct<>::_M_initialize_numpunct): Assign the new members.
	* config/locale/gnu/numeric_members.cc
	(numpunct<>::_M_initialize_numpunct): Likewise.

From-SVN: r75735
2004-01-12 17:02:08 +00:00
Mark Mitchell ea1ea21af5 testsuite_hooks.h (__gnu_test::try_mkfifo): Declare it.
* testsuite/testsuite_hooks.h (__gnu_test::try_mkfifo): Declare it.
	* testsuite/testsuite_hooks.cc (__gnu_test::try_mkfifo): Define
	it.
	* testsuite/27_io/basic_filebuf/close/char/4879.cc: Use try_mkfifo
	and remove Cygwin XFAIL.
	* testsuite/27_io/basic_filebuf/close/char/9964.cc: Likewise.
	* testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc: Likewise.
	* testsuite/27_io/basic_filebuf/open/char/9507.cc: Likewise.
	* testsuite/27_io/basic_filebuf/showmanyc/char/9533-1.cc:
	Likewise.
	* testsuite/27_io/basic_filebuf/underflow/char/10097.cc: Likewise.
	* testsuite/27_io/objects/char/7.cc: Likewise.
	* testsuite/27_io/objects/char/9661-1.cc: Likewise.
	* testsuite/27_io/objects/wchar_t/7.cc: Likewise.
	* testsuite/27_io/objects/wchar_t/9661-1.cc: Likewise.

From-SVN: r75706
2004-01-12 08:11:08 +00:00
Paolo Carlini b74a685105 2004-01-11 Paolo Carlini <pcarlini@suse.de>
* Fix a date in the ChangeLog.

From-SVN: r75682
2004-01-11 17:43:11 +00:00
Gabriel Dos Reis 3b3bfc0eeb std_complex.h (std::complex<>::real): Return a reference.
* include/std/std_complex.h (std::complex<>::real): Return a
        reference. Add non-const overload.
        (std::complex<>::real): Likewise.
        (std::real): Likewise.
        (std::imag): Likewise.
        (std::operator+): Tidy.
        (std::operator-): Likewise.
        (std::operator*): Likewise.
        (std::operator/): Likewise.
        (std::operator>>): Likewise.

From-SVN: r75680
2004-01-11 16:15:42 +00:00
Paolo Carlini 09625c1681 re PR libstdc++/13582 (basic_filebuf::imbue drops characters)
2004-01-11  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/13582
	* include/bits/fstream.tcc (imbue): Exploit the external
	buffer to imbue 'on the fly' a new locale and convert its
	remainder with the new codecvt facet.
	(underflow): Tweak slightly to deal with this special case.
	* testsuite/27_io/basic_filebuf/imbue/char/13582-2.cc: New.
	* testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-2.cc: Ditto.
	* testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-3.cc: Ditto.
	* testsuite/27_io/objects/wchar_t/13582-1_xin.cc: Ditto.
	* testsuite/27_io/objects/wchar_t/13582-1_xin.in: Ditto.

From-SVN: r75677
2004-01-11 15:17:02 +00:00
Paolo Carlini a8d6534992 lwg-active.html, [...]: Import Revision 28.
2004-01-10  Paolo Carlini  <pcarlini@suse.de>

	* docs/html/ext/lwg-active.html, docs/html/ext/lwg-defects.html:
	Import Revision 28.

From-SVN: r75648
2004-01-10 20:09:26 +00:00
Paolo Carlini b656faa883 re PR libstdc++/13630 (Wrong type for locale::category)
2004-01-10  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/13630
	* include/bits/locale_classes.h (class locale): Fix category typedef.
	* testsuite/22_locale/locale/13630.cc: Add.

From-SVN: r75635
2004-01-10 10:15:35 +00:00
Giovanni Bajo f88e471576 locale_facets.h: Make a name really dependent.
* include/bits/locale_facets.h: Make a name really dependent. This
	will be needed when Core Issue 224 is implemented.

From-SVN: r75617
2004-01-10 01:10:23 +00:00
Paolo Carlini 64cb2c4aed allocator.cc: Demangle typeid(obj).name().
2004-01-09  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/performance/allocator.cc: Demangle typeid(obj).name().
	* testsuite/performance/allocator_thread.cc: Likewise.

From-SVN: r75571
2004-01-09 10:09:31 +00:00
Benjamin Kosnik 158960ba7e crossconfig.m4: Add LFS, io bits to linux cross config.
2004-01-07  Benjamin Kosnik  <bkoz@redhat.com>

	* crossconfig.m4: Add LFS, io bits to linux cross config.
	* acconfig.h: Remove obsolete bits, reorder.
	* config.h.in: Regenerate.
	* aclocal.m4: Same.
	* configure: Same.

From-SVN: r75520
2004-01-07 22:17:01 +00:00
Benjamin Kosnik e135a038d3 [multiple changes]
2004-01-07  Gawain Bolton  <gp.bolton@computer.org>

	* include/bits/stl_list.h:
	* include/bits/list.tc:
	* src/list.cc:
        Performance enhancements for destructor, push_front(),
        push_back(), pop_front(), pop_back(), sort()
        Eliminated static_casts where possible.
        Moved code out of header files into new src/list.cc
        implementation file for library where possible.
        Remove inheritance from iterator class and create separate
        classes for non-constant and constant iterators.
	* include/bits/stl_tree.h (_Rb_tree class):
	* src/tree.cc:
        Only erase contents in destructor.
        Eliminate unnecessary initialization in assignment operator.
        Optimize for the nominal case by not checking whether
        container is empty in clear().
        Re-order test in _M_insert() to improve performance.
        Move initialization of new node's left & right pointers to
        src/tree.cc to where new node's colour is initialized
        and to reduce the amount of inline code.
        Use  _M_leftmost() and _M_end() to improve readability where
        appropriate.
        Create separate classes for non-constant and constant
        iterators to clarify code, avoid extra template parameters and
        casting away constness.

2004-01-07  Benjamin Kosnik  <bkoz@redhat.com>

	* src/Makefile.am (sources): Add list.cc, tree.cc.
	* src/stl_tree.cc: Move to...
	* src/tree.cc: ...here.
	* src/list.cc: Add.
	* config/linker-map.gnu: Tweaks.
	* testsuite/23_containers/map/operators/1_neg.cc: Add excess errors.
	* testsuite/23_containers/set/operators/1_neg.cc: Add excess errors.

	* bits/stl_vector.h: Column wrap comments.

From-SVN: r75515
2004-01-07 20:55:06 +00:00
Loren J. Rittle 677e7ddcee (re-open) PR libstdc++/12658
(re-open) PR libstdc++/12658
	* src/locale_init.cc (locale::locale): Remove ill-scoped mutex.
	(locale::global): Likewise.

From-SVN: r75509
2004-01-07 17:40:45 +00:00
Paolo Carlini d8f5bd5016 9318-in.cc: Remove redundant #include.
2004-01-07  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/27_io/basic_istream/extractors_other/char/9318-in.cc:
	Remove redundant #include.
	* testsuite/27_io/basic_ostream/endl/char/1.cc: Likewise.
	* testsuite/27_io/basic_ostream/ends/char/1.cc: Likewise,
	re-enable normal testing.
	* testsuite/27_io/basic_ostream/ends/char/2.cc: Remove redundant
	#include.
	* testsuite/27_io/basic_ostream/flush/char/1.cc: Likewise.
	* testsuite/27_io/basic_ostream/inserters_character/char/1.cc:
	Likewise.
	* testsuite/27_io/basic_ostream/inserters_character/char/2.cc:
	Likewise.
	* testsuite/27_io/basic_ostream/inserters_character/char/3.cc:
	Likewise.
	* testsuite/27_io/basic_ostream/inserters_character/char/4.cc:
	Likewise.
	* testsuite/27_io/basic_ostream/inserters_character/char/5.cc:
	Likewise.
	* testsuite/27_io/basic_ostream/inserters_character/char/6.cc:
	Likewise.
	* testsuite/27_io/basic_ostream/inserters_character/char/8.cc:
	Likewise.
	* testsuite/27_io/basic_ostream/inserters_character/wchar_t/7.cc:
	More properly, #include <locale>.
	* testsuite/27_io/basic_ostream/inserters_character/wchar_t/8.cc:
	Remove redundant #include.
	* testsuite/27_io/basic_ostream/inserters_other/char/2.cc: Likewise.
	* testsuite/27_io/basic_ostream/inserters_other/char/3.cc: Remove
	redundant DejaGnu directive.
	* testsuite/27_io/basic_ostream/inserters_other/char/4.cc: Remove
	redundant #include.

From-SVN: r75508
2004-01-07 17:13:51 +00:00
Benjamin Kosnik b61f9bf039 check_performance: Use -pthread.
2004-01-06  Benjamin Kosnik  <bkoz@redhat.com>
            Stefan Olsson  <stefan@snon.net>

	* scripts/check_performance: Use -pthread.
	* testsuite/performance/allocator.cc: Tweaks, add list.
	* testsuite/performance/allocator_thread.cc: New.

Co-Authored-By: Stefan Olsson <stefan@snon.net>

From-SVN: r75499
2004-01-07 05:59:19 +00:00
Jerry Quinn 9a01c9b061 locale_facets.h: Document public classes and functions.
2003-01-06  Jerry Quinn  <jlquinn@optonline.net>

	* include/bits/locale_facets.h: Document public classes and
	functions.
	* include/bits/locale_facets.tcc (time_get::_M_extract_via_format):
	Add comment.

From-SVN: r75498
2004-01-07 05:22:37 +00:00
Paolo Carlini b80115c4b7 1.cc: Remove redundant #includes.
2004-01-06  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/27_io/basic_istream/extractors_other/char/1.cc:
	Remove redundant #includes.
	* testsuite/27_io/basic_istream/extractors_other/char/2.cc:
	Likewise.
	* testsuite/27_io/basic_istream/extractors_other/char/3.cc:
	Likewise.
	* testsuite/27_io/basic_istream/get/char/1.cc: Likewise.
	* testsuite/27_io/basic_istream/get/char/2.cc: Likewise.
	* testsuite/27_io/basic_istream/getline/char/1.cc: Likewise.
	* testsuite/27_io/basic_istream/getline/char/2.cc: Likewise.
	* testsuite/27_io/basic_istream/getline/char/3.cc: Likewise.
	* testsuite/27_io/basic_istream/ignore/char/1.cc: Likewise.
	* testsuite/27_io/basic_istream/ignore/char/6360.cc: Likewise.
	* testsuite/27_io/basic_istream/ignore/char/7220.cc: Likewise.
	* testsuite/27_io/basic_istream/peek/char/1.cc: Likewise.
	* testsuite/27_io/basic_istream/peek/char/6414.cc: Likewise.
	* testsuite/27_io/basic_istream/putback/char/1.cc: Likewise.
	* testsuite/27_io/basic_istream/read/char/1.cc: Likewise.
	* testsuite/27_io/basic_istream/read/char/2.cc: Likewise.
	* testsuite/27_io/basic_istream/read/char/3.cc: Likewise.
	* testsuite/27_io/basic_istream/readsome/char/6746-1.cc:
	Likewise.
	* testsuite/27_io/basic_istream/readsome/char/6746-2.cc:
	Likewise.
	* testsuite/27_io/basic_istream/readsome/char/8258.cc:
	Likewise.
	* testsuite/27_io/basic_istream/seekg/char/2346-fstream.cc:
	Likewise.
	* testsuite/27_io/basic_istream/seekg/char/2346-sstream.cc:
	Likewise.
	* testsuite/27_io/basic_istream/seekg/char/8348-1.cc: Likewise.
	* testsuite/27_io/basic_istream/seekg/char/8348-2.cc: Likewise.
	* testsuite/27_io/basic_istream/tellg/char/8348.cc: Likewise.

From-SVN: r75469
2004-01-06 12:20:42 +00:00
Paolo Carlini 22ed0590a4 2004-01-04 Paolo Carlini <pcarlini@suse.de>
* Fix year in the Changelog entry of last commit.

From-SVN: r75399
2004-01-04 23:26:31 +00:00
Paolo Carlini 223b5084a6 01.cc: Remove redundant #includes.
2003-01-04  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/27_io/basic_istream/extractors_arithmetic/char/01.cc:
	Remove redundant #includes.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/02.cc:
	Likewise.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/03.cc:
	Likewise.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/06.cc:
	Likewise.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/07.cc:
	Likewise.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/08.cc:
	Likewise.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/09.cc:
	Likewise.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/10.cc:
	Likewise.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/11.cc:
	Likewise.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/13.cc:
	Likewise.
	* testsuite/27_io/basic_ostream/inserters_arithmetic/char/1.cc:
	Likewise.
	* testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc:
	Likewise.
	* testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/1.cc:
	Likewise.

From-SVN: r75398
2004-01-04 23:19:00 +00:00
Mark Mitchell 4f8163b19c re PR c++/12226 (g++ fails to enforce accessibility requirement for copy constructor)
PR c++/12226
	* call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
	(reference_binding): Set it when appropriate.
	(build_temp): New function, split out from ...
	(convert_like_real): ... here.  Honor CHECK_COPY_CONSTRUCTOR_P.
	(initialize_reference): Likewise.

	PR c++/12226
	* g++.dg/init/copy7.c: New test.

	PR c++/12226
	* testsuite/27_io/basic_filebuf/4.cc: Remove use of invalid copy
	constructor.
	* testsuite/27_io/basic_fstream/4.cc: Likewise.
	* testsuite/27_io/basic_ifstream/4.cc: Likewise.
	* testsuite/27_io/basic_ios/4.cc: Likewise.
	* testsuite/27_io/basic_iostream/4.cc: Likewise.
	* testsuite/27_io/basic_istream/4.cc: Likewise.
	* testsuite/27_io/basic_istingstream/4.cc: Likewise.
	* testsuite/27_io/basic_ofstream/4.cc: Likewise.
	* testsuite/27_io/basic_ostream/4.cc: Likewise.
	* testsuite/27_io/basic_ostringstream/4.cc: Likewise.
	* testsuite/27_io/basic_stringbuf/5.cc: Likewise.
	* testsuite/27_io/basic_stringstream/4.cc: Likewise.

	PR c++/13536
	* parser.c (cp_parser): Add in_type_id_in_expr_p.
	(cp_parser_new): Initialize it.
	(cp_parser_postfix_expression): Set it.
	(cp_parser_sizeof_operand): Likewise.
	(cp_parser_parameteR_declaration): Do not commit early to tenative
	parsers when in_type_id_in_expr_p is set.

	PR c++/13536
	* g++.dg/parse/cast1.C: New test.

From-SVN: r75397
2004-01-04 22:42:22 +00:00
Paolo Carlini 17fa55600a numeric_members.cc (_M_initialize_numpunct): Avoid unnecessarily zero terminating _M_atoms_out and _M_atoms_in...
2004-01-04  Paolo Carlini  <pcarlini@suse.de>

	* config/locale/generic/numeric_members.cc (_M_initialize_numpunct):
	Avoid unnecessarily zero terminating _M_atoms_out and _M_atoms_in;
	always use double underscored names.
	* config/locale/gnu/numeric_members.cc (_M_initialize_numpunct):
	Likewise.
	* include/bits/locale_facets.h (struct __numpunct_cache):
	Dimension _M_atoms_out and _M_atoms_in one position smaller.
	(__numpunct_cache<>::_M_cache): Don't zero terminate _M_atoms_out
	and _M_atoms_in.

From-SVN: r75393
2004-01-04 18:34:27 +00:00
Paolo Carlini 4f0c9c8a87 locale_facets.tcc (num_get::_M_extract_int, [...]): According to 22.2.2.1.2...
2003-12-31  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (num_get::_M_extract_int,
	num_get::_M_extract_float): According to 22.2.2.1.2, p8-9,
	_first_ look for thousands_sep, then for decimal_point and
	finally for digits.
	(num_get::_M_extract_float): After the decimal_point or
	'e'/'E', decimal_point and thousands_sep just break out the
	parsing loop.
	* testsuite/22_locale/num_get/get/char/11.cc: Add tests.
	* testsuite/22_locale/num_get/get/wchar_t/11.cc: Likewise.

From-SVN: r75259
2003-12-31 08:28:10 +00:00
Paolo Carlini a27cf81c7a re PR libstdc++/13369 (__verify_grouping (and __add_grouping?) not correct)
2003-12-30  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/13369
	* include/bits/locale_facets.tcc (__verify_grouping):
	Fix to deal properly with __grouping_tmp.size() >
	__grouping.size().
	* testsuite/22_locale/num_get/get/char/13.cc: New.
	* testsuite/22_locale/num_get/get/wchar_t/13.cc: Ditto.

From-SVN: r75227
2003-12-30 10:43:54 +00:00
Jerry Quinn a043b1f5c9 locale_facets.h (ctype.narrow,widen): Add cast.
2003-12-29  Jerry Quinn  <jlquinn@optonline.net>

	* include/bits/locale_facets.h (ctype.narrow,widen): Add cast.

From-SVN: r75222
2003-12-30 03:09:17 +00:00
Paolo Carlini 9d47bc51b8 acinclude.m4 (GLIBCXX_CHECK_LFS): Add -fno-exceptions to CXXFLAGS.
2003-12-29  Paolo Carlini  <pcarlini@suse.de>

	* acinclude.m4 (GLIBCXX_CHECK_LFS): Add -fno-exceptions
	to CXXFLAGS.
	* aclocal.m4: Regenerate.
	* configure: Likewise.

From-SVN: r75212
2003-12-29 20:13:22 +00:00
Mark Mitchell 517da0ce8a acconfig.h: Add _GLIBCXX_USE_C99_MATH.
* acconfig.h: Add _GLIBCXX_USE_C99_MATH.
	* acinclude.m4 (GLIBCXX_ENABLE_C99): Define GLIBCXX_USE_C99_MATH.
	* configure.ac: Define HAVE_S_ISREG and HAVE_S_IFREG when
	targeting newlib.
	* aclocal.m4: Regenerated.
	* config.h.in: Likewise.
	* configure: Likewise.
	* Makefile.in: Likewise.
	* include/Makefile.in: Likewise.
	* libmath/Makefile.in: Likewise.
	* libsupc++/Makefile.in: Likewise.
	* testsuite/Makefile.in: Likewise.
	* src/Makefile.in: Likewise.
	* po/Makefile.in: Likewise.
	* include/c_std/std_cmath.h (_GLIBCXX_USE_C99): Replace with ...
	(_GLIBCXX_USE_C99_MATH): ... this.

	* testsuite/27_io/basic_filebuf/sgetn/char/1-in.cc: XFAIL for
	arm-none-elf.
	* testsuite/27_io/basic_filebuf/sgetn/char/1-io.cc: Likewise.
	* testsuite/27_io/basic_filebuf/sgetn/char/2-in.cc: Likewise.
	* testsuite/27_io/basic_filebuf/sgetn/char/2-io.cc: Likewise.
	* testsuite/27_io/basic_istream/readsome/char/6476-2.cc: Likewise.
	* testsuite/27_io/objects/char/9.cc: Likewise.
	* testsuite/ext/stdio_filebuf/char/10063-2.cc: Likewise.

From-SVN: r75209
2003-12-29 19:26:16 +00:00
Paolo Carlini b8da67fa2f pool_allocator.h (class __pool_alloc): Use operator new and operator delete.
2003-12-28  Paolo Carlini  <pcarlini@suse.de>

	* include/ext/pool_allocator.h (class __pool_alloc): Use
	operator new and operator delete.

From-SVN: r75181
2003-12-28 12:13:15 +00:00
Andrew Pinski be88628621 atomicity.h (__exchange_and_add): Fix output constraint.
* config/cpu/i386/atomicity.h (__exchange_and_add): Fix output
        constraint.

From-SVN: r75017
2003-12-24 20:27:58 -08:00
Andrew Pinski a51c409779 re PR libstdc++/13480 (bits/atomicity.h:56: warning: read-write constraint does not allow a register)
2003-12-24  Andrew Pinski  <pinskia@physics.uc.edu>

        PR libstdc++/13480
        * config/cpu/i486/atomicity.h: Split up read-write memory operand.

From-SVN: r75016
2003-12-24 18:04:06 -08:00
Benjamin Kosnik d38d4e5d18 new_allocator.h (new_allocator): Proper allocator class.
2003-12-23  Benjamin Kosnik  <bkoz@redhat.com>

	* include/ext/new_allocator.h (new_allocator): Proper allocator class.
	(__new_alloc): Delete.
	* include/ext/malloc_allocator.h (malloc_allocator): Same.
	(__malloc_alloc): Delete.
 	* include/ext/mt_allocator.h: Same, but weakly.
 	* include/ext/debug_allocator.h: Convert to the new style.
	* include/ext/pool_allocator.h: Use global new and delete directly.
	* include/backward/alloc.h: Don't inject malloc_allocator, or
	debug_allocator.
	* testsuite/ext/allocators.cc: Minimal fixups for usage of new
	classes.  Comment out tests with __pool_alloc for now.
	* testsuite/performance/allocator.cc: Same.

From-SVN: r74965
2003-12-23 07:24:57 +00:00
Matt Austern 34c878297e stl_bvector.h (_Bvector_alloc_base): Eliminate.
* include/bits/stl_bvector.h (_Bvector_alloc_base): Eliminate.
        (_Bvector_base): Inherit directly from word allocator.
        * include/bits/stl_tree.h (_Rb_tree_alloc_base): Eliminate.
        (_Rb_tree_base): Eliminate.
        (_Rb_tree): Inherit directly from node allocator.
        * include/ext/slist (_Alist_alloc_base): Eliminate.
        (_Slist_base): Inherit direcly from node allocator.

From-SVN: r74955
2003-12-23 00:09:26 +00:00
Benjamin Kosnik 941fe801b4 numeric_limits.cc: Add _GLIBCXX_ASSERT to dg-options in testcases that use VERIFY.
2003-12-22  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/18_support/numeric_limits.cc: Add _GLIBCXX_ASSERT to
	dg-options in testcases that use VERIFY.
	* testsuite/23_containers/vector/invalidation/1.cc: Same.
	* testsuite/23_containers/vector/invalidation/2.cc: Same.
	* testsuite/23_containers/vector/invalidation/3.cc: Same.
	* testsuite/23_containers/vector/invalidation/4.cc: Same.
	* testsuite/23_containers/vector/resize/1.cc: Same.
	* testsuite/26_numerics/complex_value.cc: Same.
	* testsuite/27_io/ios_base/storage/1.cc: Same.
	* testsuite/27_io/ios_base/storage/2.cc: Same.
	* testsuite/27_io/ios_base/storage/3.cc: Same.
	* testsuite/27_io/manipulators/standard/char/2.cc: Same.
	* testsuite/backward/11460.cc: Same.
	* testsuite/backward/strstream_members.cc: Same.

	* include/ext/hash_set (class hash_multiset): Fix typo.

From-SVN: r74951
2003-12-22 21:05:22 +00:00
Benjamin Kosnik 70a8416094 5.cc: Don't use stdc++.h.gch.
2003-12-22  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/27_io/objects/char/5.cc: Don't use stdc++.h.gch.
	* testsuite/27_io/objects/wchar_t/5.cc: Same.
	* docs/html/test.html: Add docs for constructing test files that
	don't use stdc++.h.gch.
	* scripts/testsuite_flags.in (PCHFLAGS): Move to --cxxpchflags.
	* testsuite/libstdc++-dg/normal.exp: Compute DEFAULT_CXXFLAGS
	differently.

	* include/bits/ios_base.h (ios_base::Init::_S_initialized): Remove.
	* src/ios_init.cc: Same.
	* config/linker-map.gnu: Same.
	* testsuite/27_io/ios_base/cons/copy_neg.cc: Adjust line numbers.
	* testsuite/27_io/ios_base/cons/assign_neg.cc: Same.

From-SVN: r74946
2003-12-22 20:09:23 +00:00
Andrew Pinski 67e053df03 re PR libstdc++/13462 (Non-standard conformed type set::pointer)
2003-12-22  Andrew Pinski  <pinskia@physics.uc.edu>

       PR libstdc++/13462
       * include/bits/stl_multiset.h (__gnu_norm::multiset): Define pointer
       as allocator's pointer, likewise for reference, const_pointer, and
       const_reference.
       * include/bits/stl_set.h (__gnu_norm::set): Likewise.
       * include/ext/hash_set (__gnu_ext::hash_set): Likewise.
       (__gnu_ext::hash_multiset): Likewise.

From-SVN: r74944
2003-12-22 11:32:34 -08:00
Paolo Carlini a827daa06b locale_facets.tcc (num_get::_M_extract_int, [...]): According to 22.2.2.1.2...
2003-12-22  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (num_get::_M_extract_int,
	num_get::_M_extract_float): According to 22.2.2.1.2, p8-9,
	first look for decimal_point and thousands_sep, when parsing
	sign, leading zeros (and 0, Ox, 0X for integer types) too.
	* testsuite/22_locale/num_get/get/char/12.cc: New.
	* testsuite/22_locale/num_get/get/wchar_t/12.cc: Likewise.

	* testsuite/22_locale/num_get/get/char/11.cc: Add a comment.
	* testsuite/22_locale/num_get/get/wchar_t/11.cc: Likewise.

From-SVN: r74932
2003-12-22 11:00:43 +00:00
Jason Merrill c703c3900e atomicity.h: Fix oversight in previous change.
* config/cpu/powerpc/atomicity.h: Fix oversight in previous
        change.

From-SVN: r74890
2003-12-20 13:45:30 -05:00
Jerry Quinn 3101fa3c06 TODO: Update.
2003-12-20  Jerry Quinn  <jlquinn@optonline.net>

	* docs/doxygen/TODO: Update.
	* include/bits/locale_classes.h (locale, facet, id): Document.
	* include/bits/locale_facets.tcc (has_facet, use_facet): Document.

From-SVN: r74884
2003-12-20 15:51:09 +00:00
Jason Merrill 46eb4b3989 atomicity.h: Remove memory clobbers.
* config/cpu/cris/atomicity.h: Remove memory clobbers.
        * config/cpu/mips/atomicity.h: Likewise.
        * config/cpu/i486/atomicity.h: Remove memory clobbers.
        Split up read-write memory operand.
        * config/cpu/m68k/atomicity.h: Likewise.
        * config/cpu/powerpc/atomicity.h: Make memory I/O explicit.
        * config/cpu/s390/atomicity.h: Likewise.
        * config/cpu/sparc/atomicity.h: Likewise.

From-SVN: r74870
2003-12-19 22:08:42 -05:00
Carlo Wood 6fe68b3740 * bits/demangle.h
namespace __gnu_cxx::demangler
(session<Allocator>::decode_encoding): Put the postfix
of the return type of (member) functions after the function
instead of after the return type.

From-SVN: r74853
2003-12-19 23:15:24 +00:00
Jerry Quinn 2dbd0234aa 2003-12-19 Jerry Quinn <jlquinn@optonline.net>
* include/bits/locale_facet.h
        (__ctype_abstract_base,ctype<charT>,ctype<char>,ctype<wchar_t>):
        Document.

From-SVN: r74848
2003-12-19 20:44:18 +00:00
Paolo Carlini cc16f8b948 locale_facets.tcc (num_get::_M_extract_int, [...]): According to 22.2.2.1.2, p8-9, first look for decimal_point and thousands_sep.
2003-12-19  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (num_get::_M_extract_int,
	num_get::_M_extract_float): According to 22.2.2.1.2, p8-9,
	first look for decimal_point and thousands_sep.
	* testsuite/22_locale/num_get/get/char/11.cc: New.
	* testsuite/22_locale/num_get/get/wchar_t/11.cc: Likewise.

From-SVN: r74841
2003-12-19 18:14:22 +00:00
Paolo Carlini 1b4513069a locale_facets.tcc (num_get::_M_extract_float): When __found_sci becomes true stop eating thousands separators and the decimal...
2003-12-19  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (num_get::_M_extract_float):
	When __found_sci becomes true stop eating thousands separators
	and the decimal radix separator.
	* testsuite/22_locale/num_get/get/char/9.cc: New.
	* testsuite/22_locale/num_get/get/wchar_t/9.cc: Likewise.

	* config/locale/generic/c_locale.cc (__convert_to_v): Don't
	check that *__sanity == '\0': parsing may stop earlier, still
	be successful.
	* config/locale/gnu/c_locale.cc: Likewise.
	* testsuite/22_locale/num_get/get/char/10.cc: New.
	* testsuite/22_locale/num_get/get/wchar_t/10.cc: Likewise.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/10.cc:
	Tweak in one place accordingly.

	* testsuite/22_locale/money_get/get/char/1.cc: Fix typo.
	* testsuite/22_locale/money_get/get/wchar_t/1.cc: Likewise.

From-SVN: r74826
2003-12-19 09:35:24 +00:00
Benjamin Kosnik 4d54539c8f stl_list.h: Formatting tweaks.
2003-12-18  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/stl_list.h: Formatting tweaks.
	* include/bits/list.tcc: Same.

From-SVN: r74795
2003-12-18 20:23:04 +00:00
Matt Austern 8a1d8dd9c8 demangle.h: Fix allocator type correctness, i.e.
* include/bits/demangle.h: Fix allocator type correctness,
	i.e. make sure that when we instantiate a container with a value
	type and an allocator, the allocator's value type matches the
	container's.
	* include/bits/stl_deque.h (_Deque_alloc_base): Eliminate.
	(_Deque_base): inherit directly from the deque's allocator.  Use
	rebinding instead of _Alloc_traits.  Pick up data members from
	_Deque_alloc_base.
	* include/bits/stl_list.h (_List_alloc_base): Eliminate.
	(_List_base): Inherit directly from the list's allocator.  Use
	rebinding instead of _Alloc_traits.  Pick up data members from
	_List_alloc_base.
	* include/bits/stl_vector.h (_Vector_alloc_base): Eliminate
	(_Vector_base): Inherit directly from the vector's allocator.  Use
	rebinding instead of _Alloc_traits.  Pick up data members from
	_Vector_alloc_base.
	* include/ext/hashtable.h: Fix allocator type correctness (the
	vector of buckets must be passed an allocator for objects of
	type _Node*).  Use rebinding instead of _Alloc_traits.

From-SVN: r74787
2003-12-18 18:35:38 +00:00
Paolo Carlini 7e08b3b816 locale_facets.tcc (time_get::_M_extract_via_format): Use narrow to get from __format[__i] a char __c representing a formatting code...
2003-12-17  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (time_get::_M_extract_via_format):
	Use narrow to get from __format[__i] a char __c representing a
	formatting code, don't use it to compare *__beg to __format[__i].
	* testsuite/22_locale/time_get/get_date/wchar_t/4.cc: New.

From-SVN: r74755
2003-12-17 22:14:09 +00:00
Paolo Carlini cbf22cc549 container_benchmark.cc: Tweak outputs.
2003-12-17  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/performance/container_benchmark.cc: Tweak outputs.

	* testsuite/performance/list_create_fill_sort.cc: Shrink a
	bit some outputs.

	* testsuite/testsuite_performance.h: Widen a few output fields.

	* testsuite/performance/ifstream_extract_int.cc: New.

From-SVN: r74738
2003-12-17 10:16:03 +00:00
Phil Edwards 2d52e9e364 configure.ac (AM_INIT_AUTOMAKE): Don't warn about GNU Make.
2003-12-16  Phil Edwards  <phil@codesourcery.com>

	* configure.ac (AM_INIT_AUTOMAKE):  Don't warn about GNU Make.
	* configure:  Regenerated.
	* Makefile.am (check-%):  New catch-all forwarding target.
	* Makefile.in:  Regenerated.

From-SVN: r74718
2003-12-16 23:44:53 +00:00
Paolo Carlini 93cbdb1a0c container_benchmark.cc: New...
2003-12-16  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/performance/container_benchmark.cc: New, a
	benchmark developed by Bjarne Stroustrup and Alexander
	Stepanov and made available with no restrictions.

	* testsuite/testsuite_performance.h (report_header): New,
	useful to produce header lines in the reports.

From-SVN: r74713
2003-12-16 22:44:19 +00:00
Jonathan Wakely d159598dda howto.html: Document shrink-to-fit reserve().
2003-12-16  Jonathan Wakely  <redi@gcc.gnu.org>

	* docs/html/21_strings/howto.html: Document shrink-to-fit reserve().
	* docs/html/faq/index.html: Reducing vector's capacity() to size().
	* docs/html/documentation.html, docs/html/faq/index.txt: Regenerate.

From-SVN: r74695
2003-12-16 13:57:55 +00:00
Paolo Carlini b1660ae9ea narrow_widen_char.cc: Tweak the number of iterations for each test.
2003-12-16  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/performance/narrow_widen_char.cc: Tweak the
	number of iterations for each test.
	* testsuite/performance/narrow_widen_wchar_t.cc: Add a
	missing clear_counters.

From-SVN: r74692
2003-12-16 13:25:23 +00:00
Paolo Carlini 9a1349b920 re PR libstdc++/11723 (ctype<wchar_t>::do_is(mask, wchar_t) is slow)
2003-12-16  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/11723
	* include/bits/locale_facets.h: Add _M_bit and _M_wmask,
	used to speed up the computation of ctype::do_is.
	* config/locale/generic/ctype_members.cc
	(_M_initialize_ctype): Fill _M_bit and _M_wmask.
	(ctype::do_is): Use _M_bit and _M_wmask.
	* config/locale/gnu/ctype_members.cc: Likewise.
	* testsuite/performance/is_wchar_t.cc: New.

	* testsuite/performance/narrow_widen_wchar_t.cc: Tweak
	string literal (incorrect citation ;)

	* include/bits/locale_facets.h: Minor tweaks, const
	correctness, unsigned -> size_t.

From-SVN: r74686
2003-12-16 11:00:52 +00:00
Jerry Quinn 84cea62612 locale_facets.h (widen, narrow): Uncomment the intended code.
2003-12-16  Jerry Quinn  <jlquinn@optonline.net>

	* include/bits/locale_facets.h (widen, narrow):  Uncomment the
	intended code.

From-SVN: r74668
2003-12-16 05:39:36 +00:00
Jerry Quinn 3fc63c15b4 ctype_noninline.h, [...] (ctype): Initialize _M_narrow, _M_widen.
2003-12-15  Jerry Quinn  <jlquinn@optonline.net>

        * config/os/aix/ctype_noninline.h,
	config/os/bsd/freebsd/ctype_noninline.h,
	config/os/bsd/netbsd/ctype_noninline.h,
	config/os/djgpp/ctype_noninline.h,
	config/os/generic/ctype_noninline.h,
	config/os/gnu-linux/ctype_noninline.h,
	config/os/hpux/ctype_noninline.h,
	config/os/irix/irix5.2/ctype_noninline.h,
	config/os/irix/irix6.5/ctype_noninline.h,
	config/os/mingw32/ctype_noninline.h,
	config/os/newlib/ctype_noninline.h,
	config/os/qnx/qnx6.1/ctype_noninline.h,
	config/os/solaris/solaris2.5/ctype_noninline.h,
	config/os/solaris/solaris2.6/ctype_noninline.h,
	config/os/solaris/solaris2.7/ctype_noninline.h,
	config/os/vxworks/ctype_noninline.h,
	config/os/windiss/ctype_noninline.h (ctype):  Initialize
	_M_narrow, _M_widen.
	* include/bits/locale_facets.h (_M_widen, _M_widen_ok,
	_M_narrow, _M_narrow_ok): New.
	(widen, narrow): Use tables to bypass virtual functions.
	(_M_widen_init, _M_narrow_init): New.

From-SVN: r74662
2003-12-16 01:57:03 +00:00
Carlo Wood 91daef582a ios_base.h (Init::_S_initialized): Change into declaration.
* include/bits/ios_base.h (Init::_S_initialized): Change into declaration.
* src/ios_init.cc (Init::_S_initialized): Add definition.

From-SVN: r74656
2003-12-16 00:15:24 +00:00
Benjamin Kosnik 3fe1373814 re PR libstdc++/12658 (Thread safety problems in locale::global() and locale::locale())
2003-12-15  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/12658
	* include/Makefile.am (bits_headers): Add concurrence.h.
	* include/Makefile.in: Regenerated.
	* include/bits/concurrence.h: New.
	* src/locale_init.cc: Use it.
	(locale::locale): Lock critical regions.
	(locale::global): Same.

From-SVN: r74648
2003-12-15 21:08:03 +00:00
Benjamin Kosnik 1313d87fd3 basic_string.h: Change _*_references to _*_refcount.
2003-12-15  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/basic_string.h: Change _*_references to _*_refcount.
	* include/bits/locale_classes.h: Same.
	* src/locale.cc: Same.
	* src/locale_name.cc: Same.
	* src/locale_init.cc: Same.

From-SVN: r74645
2003-12-15 19:48:50 +00:00
Benjamin Kosnik fa972243f6 re PR libstdc++/12855 (Thread safety problems in ios_base::Init)
2003-12-15  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/12855
	* include/bits/ios_base.h (Init::_S_ios_base_init): Change to
	_S_refcount, make atomic.
	* src/ios.cc: Adjust definition.
	* src/ios_init.cc (ios_base::Init::Init): Use __exchange_and_add,
	and __atomic_add.
	(ios_base::Init::~Init): Same.
	* testsuite/27_io/ios_base/cons/assign_neg.cc: Adjust line numbers.
	* testsuite/27_io/ios_base/cons/copy_neg.cc: Same.

From-SVN: r74642
2003-12-15 19:03:13 +00:00
Paolo Carlini ca13fb7f5d locale_facets.tcc (num_get::do_get(bool&)): Fail as soon as the begins of both truename and falsename stop to match...
2003-12-15  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (num_get::do_get(bool&)):
	Fail as soon as the begins of both truename and falsename
	stop to match; always leave __beg one position beyond the
	last char successfully matched.
	* testsuite/22_locale/num_get/get/char/8.cc: New.
	* testsuite/22_locale/num_get/get/wchar_t/8.cc: Likewise.

2003-12-15  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.h (_M_widen): Reserve space
	for all the possible widened chars.
	* config/locale/generic/ctype_members.cc (_M_initialize_ctype):
	Compute at construction time all the possible widened chars.
	(do_widen): Tweak, simplify.
	* config/locale/gnu/ctype_members.cc: Likewise.
	* testsuite/performance/narrow_widen_wchar_t.cc: Add tests
	for the array versions.

From-SVN: r74636
2003-12-15 16:56:42 +00:00
Paolo Carlini e3c0c0989b re PR libstdc++/13341 (ctype<wchar_t>::do_narrow(wchar_t, char) is slow)
2003-12-12  Paolo Carlini  <pcarlini@suse.de>
	    Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/13341
	* include/bits/locale_facets.h (ctype<wchar_t>): Declare
	_M_initialize_ctype() and _M_narrow_ok, _M_narrow and _M_widen.
	* src/ctype.cc (ctype<wchar_t>::ctype(size_t),
	ctype<wchar_t>::ctype(__c_locale, size_t)): Use
	_M_initialize_ctype to fill _M_narrow and _M_widen.
	(ctype_byname<wchar_t>::ctype_byname(const char*, size_t)):
	Likewise.
	* config/locale/generic/ctype_members.cc (do_narrow, do_widen)
	Use _M_narrow and _M_widen when possible, instead of calling
	wctob and btowc, respectively.
	(_M_initialize_ctype): Define, it fills at construction time
	_M_narrow and _M_widen.
	* config/locale/gnu/ctype_members.cc: Likewise.
	* testsuite/performance/narrow_widen_wchar_t.cc: New.

Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com>

From-SVN: r74580
2003-12-12 19:44:17 +00:00
Jonathan Wakely a7bc3cdc85 index.txt: Regenerate after adding <link> tags.
2003-12-12  Jonathan Wakely  <redi@gcc.gnu.org>

	* docs/html/faq/index.txt: Regenerate after adding <link> tags.

From-SVN: r74563
2003-12-12 10:55:43 +00:00
Neil Ferguson cbc6795585 basic_string.tcc (reserve): Allow shrink-to-fit.
2003-12-11  Neil Ferguson  <nferguso@eso.org>
	    Paolo Carlini  <pcarlini@suse.de>

	* include/bits/basic_string.tcc (reserve): Allow shrink-to-fit.
	* testsuite/21_strings/basic_string/capacity/1.cc: Tweak.
	* testsuite/21_strings/basic_string/capacity/char/1.cc: Ditto.
	* testsuite/21_strings/basic_string/capacity/wchar_t/1.cc: Ditto.

Co-Authored-By: Paolo Carlini <pcarlini@suse.de>

From-SVN: r74551
2003-12-11 22:29:12 +00:00
Benjamin Kosnik 645112ddcc re PR libstdc++/6243 (testsuite fails almost all tests due to no libintl in LD_LIBRARY_PATH during test.)
2003-12-10  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/6243
	* testsuite/lib/libstdc++.exp (v3-init): Add
	original_ld_library_path, calculate ld_library path, set
	LD_LIBRARY_PATH to both. Based on libjava.exp.

From-SVN: r74521
2003-12-11 01:08:14 +00:00
Benjamin Kosnik 9f503dd352 re PR libstdc++/11612 (abi_check not finding correct libgcc_s.so.1)
2003-12-10  Benjamin Kosnik  <bkoz@redhat.com>
            Alexandre Oliva  <aoliva@redhat.com>

	PR libstdc++/11612
	* testsuite/Makefile.am (GLIBCXX_DIR): New.
	(GLIBGCC_DIR): New.
	(CXXLINK): Use both with -R so libtool links the correct libs.

Co-Authored-By: Alexandre Oliva <aoliva@redhat.com>

From-SVN: r74508
2003-12-10 21:43:10 +00:00
Paolo Carlini 3090572ce2 re PR libstdc++/13217 (basic_filebuf::underflow doesn't deal gracefully with read errors)
2003-12-10  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/13217
	* include/bits/fstream.tcc (underflow): Deal gracefully with
	read errors: throw ios_base::failure.

From-SVN: r74506
2003-12-10 20:05:00 +00:00
Benjamin Kosnik 35d6801ebe re PR libstdc++/10063 (stdio_filebuf broken)
2003-12-10  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/10063
	* config/io/basic_file_stdio.cc (__basic_file::sys_open): Sync.
	* testsuite/ext/stdio_filebuf/char/10063-1.cc: New.
	* testsuite/ext/stdio_filebuf/char/10063-2.cc: New.

From-SVN: r74505
2003-12-10 17:37:25 +00:00
Paolo Carlini e8c5fc6649 locale_facets.tcc (num_put::do_put(void*)): Remove the try/catch, not necessary.
2003-12-10  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (num_put::do_put(void*)):
	Remove the try/catch, not necessary.

From-SVN: r74493
2003-12-10 10:06:19 +00:00
Paolo Carlini 9877afe873 12438.cc: Tweak memory limit and iterations to avoid spurious failures on some 64 bit...
2003-12-10  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/22_locale/locale/cons/12438.cc: Tweak memory
	limit and iterations to avoid spurious failures on some
	64 bit machines.

From-SVN: r74489
2003-12-10 09:26:50 +00:00
Benjamin Kosnik 5ec3f5662c linker-map.gnu: Remove private ios_base members from export list.
2003-12-09  Benjamin Kosnik  <bkoz@redhat.com>

        * config/linker-map.gnu: Remove private ios_base members from
        export list.

        * config/cpu/alpha/atomicity.h: Consistently format.
        * config/cpu/cris/atomicity.h: Same.
        * config/cpu/generic/atomicity.h: Same.
        * config/cpu/hppa/atomicity.h: Same.
        * config/cpu/i386/atomicity.h: Same.
        * config/cpu/i486/atomicity.h: Same.
        * config/cpu/ia64/atomicity.h: Same.
        * config/cpu/m68k/atomicity.h: Same.
        * config/cpu/mips/atomicity.h: Same.
        * config/cpu/powerpc/atomicity.h: Same.
        * config/cpu/s390/atomicity.h: Same.
        * config/cpu/sparc/atomicity.h: Same.

From-SVN: r74486
2003-12-10 04:52:37 +00:00
Benjamin Kosnik 8602555360 re PR libstdc++/13296 (unnecessary libunwind support in libstdc++-v3)
2003-12-09  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/13296
	* acinclude.m4 (GLIBCXX_ENABLE_LIBUNWIND_EXCEPTIONS): Remove.
	* aclocal.m4: Regenerate.
	* configure.ac: Remove call to GLIBCXX_ENABLE_LIBUNWIND_EXCEPTIONS.
	* conigure: Regenerate.
	* src/Makefile.am (libstdc___la_LDFLAGS): Remove LIBUNWIND_FLAGS.
	* src/Makefile.in: Regenerate.
	* docs/html/17_intro/configury.html: Modify.

From-SVN: r74479
2003-12-10 00:05:36 +00:00
Paolo Carlini 7c1ca56950 demangle.h (struct implementation_details): Keep in comments the names of the unused parameters.
2003-12-09  Paolo Carlini  <pcaelini@suse.de>

	* include/bits/demangle.h (struct implementation_details):
	Keep in comments the names of the unused parameters.

From-SVN: r74478
2003-12-09 22:54:25 +00:00
Paolo Carlini 015fa9712b demangle.h (struct implementation_details): Fix unused parameters warning.
2003-12-09  Paolo Carlini  <pcaelini@suse.de>

	* include/bits/demangle.h (struct implementation_details):
	Fix unused parameters warning.

From-SVN: r74477
2003-12-09 22:45:21 +00:00
Paolo Carlini 1f3adac20c locale_facets.tcc (num_get::_M_extract_int): Slightly streamline the code dealing with overflows and the parsing of the sign.
2003-12-09  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (num_get::_M_extract_int):
	Slightly streamline the code dealing with overflows and the
	parsing of the sign.

From-SVN: r74476
2003-12-09 20:02:58 +00:00
Bernardo Innocenti fa30fe72d1 algorithm, [...]: Remove trailing whitespace.
* include/ext/algorithm, include/ext/debug_allocator.h,
	include/ext/enc_filebuf.h, include/ext/functional,
	include/ext/hash_fun.h, include/ext/hash_map, include/ext/hash_set,
	include/ext/hashtable.h, include/ext/iterator,
	include/ext/malloc_allocator.h, include/ext/memory,
	include/ext/mt_allocator.h, include/ext/numeric,
	include/ext/pod_char_traits.h, include/ext/pool_allocator.h,
	include/ext/rb_tree, include/ext/rope, include/ext/ropeimpl.h,
	include/ext/slist, include/ext/stdio_filebuf.h,
	include/ext/stdio_sync_filebuf.h: Remove trailing whitespace.

From-SVN: r74464
2003-12-09 05:31:53 +01:00
Bernardo Innocenti 526da49cc7 bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
	include/debug/formatter.h, include/debug/hash_map.h,
	include/debug/hash_multimap.h, include/debug/hash_multiset.h,
	include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
	include/debug/map.h, include/debug/multimap.h,
	include/debug/multiset.h, include/debug/safe_base.h,
	include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
	include/debug/safe_sequence.h, include/debug/set.h,
	include/debug/string, include/debug/vector: Remove trailing whitespace.

From-SVN: r74463
2003-12-09 05:26:28 +01:00
Bernardo Innocenti 23131008f6 iso646.h, [...]: Remove trailing whitespace.
* include/c_compatibility/iso646.h, include/c_compatibility/limits.h,
	include/c_compatibility/locale.h, include/c_compatibility/stdio.h,
	include/c_compatibility/string.h, include/c_compatibility/time.h,
	include/c_compatibility/wchar.h, include/c_compatibility/wctype.h:
	Remove trailing whitespace.

From-SVN: r74460
2003-12-09 04:51:46 +01:00
Bernardo Innocenti 7dd8177fc7 cmath.tcc, [...]: Remove trailing whitespace.
* include/c_std/cmath.tcc, include/c_std/std_cassert.h,
	include/c_std/std_cctype.h, include/c_std/std_cmath.h,
	include/c_std/std_cstddef.h, include/c_std/std_cstdio.h,
	include/c_std/std_cstdlib.h, include/c_std/std_cstring.h,
	include/c_std/std_cwchar.h, include/c_std/std_cwctype.h:
	Remove trailing whitespace.

From-SVN: r74458
2003-12-09 04:44:35 +01:00
Bernardo Innocenti 7b74e24ee2 std_cctype.h, [...]: Remove trailing whitespace.
* include/c/std_cctype.h, include/c/std_cmath.h,
	include/c/std_cstdlib.h include/c/std_cwchar.h,
	include/c/std_cwctype.h: Remove trailing whitespace.

From-SVN: r74457
2003-12-09 04:41:52 +01:00
Bernardo Innocenti e64738b308 algo.h, [...]: Remove trailing whitespace.
* include/backward/algo.h, include/backward/algobase.h,
	include/backward/alloc.h, include/backward/complex.h,
	include/backward/defalloc.h, include/backward/function.h,
	include/backward/iterator.h, include/backward/new.h,
	include/backward/ostream.h, include/backward/queue.h,
	include/backward/rope.h, include/backward/stream.h,
	include/backward/streambuf.h, include/backward/strstream,
	include/backward/tempbuf.h, include/backward/tree.h,
	include/backward/vector.h: Remove trailing whitespace.

From-SVN: r74455
2003-12-09 04:27:10 +01:00
Paolo Carlini 0fa96a6006 c_locale.cc (__convert_to_v(long&), [...]): Remove.
2003-12-08  Paolo Carlini  <pcarlini@suse.de>

	* config/locale/generic/c_locale.cc (__convert_to_v(long&),
	__convert_to_v(unsigned long&), __convert_to_v(long long&),
	__convert_to_v(unsigned long long&): Remove.
	(__convert_to_v(float&), __convert_to_v(double&),
	__convert_to_v(long double&)): Remove last unused parameter.
	* config/locale/gnu/c_locale.cc: Likewise.
	* include/bits/locale_facets.h: Likewise.
	(num_get::_M_extract_int): Update declaration.
	(class __num_base): Tweak _S_ie and _S_iE according to the
	_S_atoms_in changes.
	* include/bits/locale_facets.tcc (num_get::_M_extract_int):
	Provide directly the final _ValueT, not a string: accumulate
	the result checking for overflow at each digit.
	(num_get::do_get(bool&), num_get::do_get(long&),
	num_get::do_get(unsigned short&), num_get::do_get(unsigned int&),
	num_get::do_get(unsigned long&), num_get::do_get(long long&),
	num_get::do_get(unsigned long long&), num_get::do_get(void*&)):
	Use the new _M_extract_int, simplify.
	* src/locale-inst.cc (num_get::_M_extract_int(long&),
	num_get::_M_extract_int(unsigned short&),
	num_get::_M_extract_int(unsigned int&),
	num_get::_M_extract_int(unsigned long&),
	num_get::_M_extract_int(long long&),
	num_get::_M_extract_int(unsigned long long&): Instantiate.
	* src/locale_facets.cc (__num_base::_S_atoms_in): Reorder
        the chars in the natural order: abcdefABCDEF.

From-SVN: r74423
2003-12-08 15:37:03 +00:00
David S. Miller 09755a8512 re PR libstdc++/12496 (wrong result for __atomic_add(&value, -1) when using -O0 -m64)
2003-12-08  David S. Miller  <davem@redhat.com>

	PR libstdc++/12496
	* config/cpu/sparc/atomicity.h (__exchange_and_add, __atomic_add):
	Extend increment to _Atomic_word before giving to assembler.

From-SVN: r74409
2003-12-08 02:01:01 -08:00
Benjamin Kosnik 57616df1c3 13189.cc: Guard for __enc_traits.
2003-12-06  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/ext/enc_filebuf/char/13189.cc: Guard for __enc_traits.
	* testsuite/ext/enc_filebuf/wchar_t/13189.cc: Same.

From-SVN: r74380
2003-12-07 04:15:16 +00:00
Benjamin Kosnik e80213d249 re PR libstdc++/11691 (stdio_filebuf leaks FILE buffer when "no close" is requested)
2003-12-06  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/11691
	* include/ext/stdio_filebuf.h (stdio_filebuf::stdio_filebuf):
	Remove __del argument to file descriptor constructor.
	* config/io/basic_file_stdio.h (__basic_file::sys_open): Remove
	bool argument.
	* config/io/basic_file_stdio.cc: Same.

From-SVN: r74379
2003-12-07 03:46:14 +00:00
Benjamin Kosnik 4213442917 re PR libstdc++/13189 (<ext/enc_filebuf.h> fails to compile)
2003-12-05  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/13189
	* include/ext/enc_filebuf.h: Fix.
	* include/bits/fstream.tcc: Tweak formatting.
	* include/bits/postypes.h: Same.
	* include/bits/sstream.tcc: Same.
	* include/bits/streambuf.tcc: Same.
	* testsuite/ext/stdio_filebuf.cc: Split.
	* testsuite/ext/stdio_filebuf_2.cc: Split.
	* testsuite/ext/stdio_sync_filebuf_char.cc: Split.
	* testsuite/ext/stdio_sync_filebuf_wchar_t.cc: Split.
	* testsuite/ext/enc_filebuf/char/13189.cc: New.
	* testsuite/ext/enc_filebuf/wchar_t/13189.cc: New.
	* testsuite/ext/stdio_filebuf/char/1.cc: New.
	* testsuite/ext/stdio_filebuf/char/2.cc: New.
	* testsuite/ext/stdio_sync_filebuf/char/1.cc: New.
	* testsuite/ext/stdio_sync_filebuf/char/12048-1.cc: New.
	* testsuite/ext/stdio_sync_filebuf/char/12048-2.cc: New.
	* testsuite/ext/stdio_sync_filebuf/char/12048-3.cc: New.
	* testsuite/ext/stdio_sync_filebuf/char/12048-4.cc: New.
	* testsuite/ext/stdio_sync_filebuf/wchar_t/1.cc: New.
	* testsuite/ext/stdio_sync_filebuf/wchar_t/12948-1.cc: New.
	* testsuite/ext/stdio_sync_filebuf/wchar_t/12948-2.cc: New.
	* testsuite/ext/stdio_sync_filebuf/wchar_t/12948-3.cc: New.
	* testsuite/ext/stdio_sync_filebuf/wchar_t/12948-4.cc: New.

From-SVN: r74313
2003-12-05 06:54:24 +00:00
Carlo Wood 69f73bd395 re PR libstdc++/13045 (Demangler does demangle floating values.)
PR libstdc++/13045
* bits/demangle.h
namespace __gnu_cxx::demangler
(enum substitution_nt): Removed trailing comma.
(implementation_details): Added.
(session<Allocator>::M_implementation_details): Added.
(session<Allocator>::session): Pass implementation_details.
(session<Allocator>::decode_encoding): Same.
(session<Allocator>::decode_real): Added.
(_GLIBCXX_DEMANGLER_STYLE_VOID _GLIBCXX_DEMANGLER_STYLE_LITERAL
_GLIBCXX_DEMANGLER_STYLE_LITERAL_INT
_GLIBCXX_DEMANGLER_STYLE_COMPACT_EXPR_OPS
_GLIBCXX_DEMANGLER_STYLE_SIZEOF_TYPENAME): Replaced with
implementation_details equivalent.
(session<Allocator>::decode_expression):
Use M_implementation_details instead of macros. Add extra parentheses
around 'larger than' operator in expressions in template arguments.
(session<Allocator>::decode_bare_function_type): Idem.
(session<Allocator>::decode_literal):
Idem, and call decode_real for floating literals.
(session<Allocator>::decode_type_with_postfix): Put the postfix
of the return type of (member) functions after the function
instead of after the return type.  Also, put a space after the
prefix of qualified function pointers: "int (* const<space>".
* src/demangle.cc: include most dependent header file first.
* testsuite/demangle/regression/cw-16.cc: Updated two
and added three tests.

From-SVN: r74304
2003-12-05 02:40:53 +00:00
Benjamin Kosnik 82fa4538b5 re PR libstdc++/13284 (126 g++ failures due to lrand48 not defined)
2003-12-04  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/13284
	* include/bits/stl_algo.h (__random_number): Remove.
	(random_shuffle): Use rand, as permitted by DR 395.
	* include/ext/algorithm: Same.
	* linkage.m4 (GLIBCXX_CHECK_STDLIB_SUPPORT): Remove lrand48.
	* acconfig.h: Same.
	* crossconfig.m4: Remove HAVE_DRAND48, HAVE_LRAND48.
	* config.h.in: Regenerated.
	* configure: Same.
	* aclocal.m4: Same.

From-SVN: r74288
2003-12-04 19:37:21 +00:00
Paolo Carlini 7f1156ed35 re PR libstdc++/12653 (Resolution of DR 303 (WP) still unimplemented)
2003-12-04  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/12653
	* include/std/std_bitset.h (operator>>): Implement resolution
	of DR 303 [WP]: use widen('0') and widen('1').
	* docs/html/ext/howto.html: Add an entry for DR 303.

	* include/std/std_bitset.h (operator>>): Implement the common
	requirements of formatted input functions (27.6.1.2.1).

	* include/std/std_bitset.h (operator>>): Set the failbit when
	nothing was extracted and _Nb != 0.
	* testsuite/23_containers/bitset/input/1.cc: New.

From-SVN: r74276
2003-12-04 09:45:29 +00:00
Paolo Carlini 3259561c4c re PR libstdc++/12791 (_M_extract_num returns a wrong __beg in case of error)
2003-12-03  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/12791
	* include/bits/locale_facets.tcc (time_get::_M_extract_num):
	Rewrite, stop the parsing as soon as a digit cannot possibly
	lead to a final number within the bounds; otherwise, simplify,
	avoiding __ctype.is() and atoi().
	* testsuite/22_locale/time_get/get_date/char/12791.cc: New.
	* testsuite/22_locale/time_get/get_date/wchar_t/12791.cc: New.

	* include/bits/locale_facets.tcc (time_get::_M_extract_via_format):
	Minor tweak: a 4-digit integer cannot be bigger than 9999.

	* testsuite/22_locale/time_get/get_date/wchar_t/1.cc: Use
	type-correct wchar_t string literals.
	* testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc: Ditto.
	* testsuite/22_locale/time_get/get_time/wchar_t/1.cc: Ditto.
	* testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc: Ditto.
	* testsuite/22_locale/time_get/get_year/wchar_t/1.cc: Ditto.

From-SVN: r74220
2003-12-03 09:18:28 +00:00
Paolo Carlini 17e15f7f3b locale_facets.tcc (time_get::do_get_year): Avoid using a basic_string and calling a full blown strtol (via __convert_to_v)...
2003-12-02  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (time_get::do_get_year):
	Avoid using a basic_string and calling a full blown strtol
	(via __convert_to_v) for simple 2 or 4 digits, base 10,
	positive integers; simplify.

From-SVN: r74193
2003-12-02 18:30:42 +00:00
Paolo Carlini 142b798be5 2003-12-02 Paolo Carlini <pcarlini@suse.de>
* config/locale/gnu/monetary_members.cc
	(money_base::_S_construct_pattern): For case 3: and 4:
	exchanging 'if (__precedes)' and 'if (__space)' allows
	to factor out a few more assignments.

From-SVN: r74168
2003-12-02 09:16:30 +00:00
Benjamin Kosnik 6b98580b89 basic_ios.h (basic_ios::setstate): Revert.
2003-12-01  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/basic_ios.h (basic_ios::setstate): Revert.
	* include/bits/istream.tcc: Only call setstate if __err != goodbit.
	* include/bits/ostream.tcc: Same.
	* testsuite/27_io/basic_ios/exceptions/char/2.cc: New.

	* testsuite/testsuite_io.h (__gnu_test::fail_streambuf): Make
	internal buffer non-static.

From-SVN: r74151
2003-12-02 02:48:51 +00:00
Benjamin Kosnik d78e147a14 C++STYLE: Add exception bits.
2003-12-01  Benjamin Kosnik  <bkoz@redhat.com>

	* docs/html/17_intro/C++STYLE: Add exception bits.
	* include/bits/fstream.tcc: Add location info to exception strings.

	* include/bits/stl_construct.h: Formatting tweaks.

From-SVN: r74119
2003-12-01 18:48:24 +00:00
Paolo Carlini 9dbaa9489f re PR libstdc++/10378 ([library DR 402] cannot add object with inplace new into STL collections)
2003-12-01  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/10378
	* include/bits/allocator.h (allocator::construct): Implement
	resolution of DR 402 [Ready] (in Revision 28).
	* include/bits/allocator_traits.h (__allocator::construct):
	Likewise.
	* include/bits/stl_construct.h (_Construct): Likewise.
	* testsuite/20_util/allocator_members.cc: Move to...
	* testsuite/20_util/allocator/1.cc: ... here.
	* testsuite/20_util/allocator/10378.cc: New.
	* docs/html/ext/howto.html: Add an entry for DR 402.

From-SVN: r74104
2003-12-01 15:34:07 +00:00
Paolo Carlini 1644f06da7 codecvt_members.cc (codecvt::do_in, [...]): More minor tweaks.
2003-11-30  Paolo Carlini  <pcarlini@suse.de>

	* config/locale/gnu/codecvt_members.cc (codecvt::do_in,
	codecvt::do_length): More minor tweaks.

From-SVN: r74069
2003-11-30 19:10:50 +00:00
Paolo Carlini 11816ba280 codecvt_members.cc (codecvt::do_in): Minor stylistic tweak.
2003-11-30  Paolo Carlini  <pcarlini@suse.de>

	* config/locale/gnu/codecvt_members.cc (codecvt::do_in):
	Minor stylistic tweak.

From-SVN: r74060
2003-11-30 15:18:27 +00:00
Paolo Carlini 6c39c2075a locale_facets.tcc (num_put::do_put(..., bool)): Minor tweaks, consistent with the style used in other facets.
2003-11-30  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (num_put::do_put(..., bool)):
	Minor tweaks, consistent with the style used in other facets.

From-SVN: r74056
2003-11-30 11:33:23 +00:00
Paolo Carlini 4da2b96035 fstream.tcc (underflow): Minor tweaks in preparation for libstdc++/13217.
2003-11-29  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/fstream.tcc (underflow): Minor tweaks in
	preparation for libstdc++/13217.

From-SVN: r74038
2003-11-29 22:49:46 +00:00
Paolo Carlini 2d25605a54 13171-2.cc: Tweak for a few small problems (fix timings, use VERIFY..)
2003-11-29  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc:
	Tweak for a few small problems (fix timings, use VERIFY..)

From-SVN: r74034
2003-11-29 17:42:16 +00:00
Paolo Carlini 05a47a473d 13171-3.cc: Remove.
2003-11-28  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/27_io/basic_filebuf/imbue/char/13171-3.cc: Remove.
	* testsuite/27_io/basic_filebuf/imbue/wchar_t/13171-3.cc: New,
	the original third testcase for libstdc++/13171 belong here.

From-SVN: r74017
2003-11-28 10:24:27 +00:00
Paolo Carlini ac912ba1db 13171-3.cc: Remove extraneous wchar_t lines.
2003-11-28  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/27_io/basic_filebuf/imbue/char/13171-3.cc:
	Remove extraneous wchar_t lines.

From-SVN: r74016
2003-11-28 08:02:51 +00:00
Paolo Carlini 5536b61c1e re PR libstdc++/11544 (wifstream conversion errors result in wrong rdstate())
2003-11-27  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/11544
	PR libstdc++/11603
	* include/bits/fstream.tcc (underflow): Throw ios_base:failure
	upon incomplete or invalid byte sequences in the file.
	* testsuite/27_io/basic_filebuf/underflow/wchar_t/11544-1.cc: New.
	* testsuite/27_io/basic_filebuf/underflow/wchar_t/11544-2.cc: New.
	* testsuite/27_io/basic_filebuf/underflow/wchar_t/11603.cc: New.

From-SVN: r74000
2003-11-27 17:56:05 +00:00
Paolo Carlini fb8d463851 std_streambuf.h (__copy_streambufs): Remove the first, unused, basic_ios<> parameter.
2003-11-27  Paolo Carlini  <pcarlini@suse.de>

	* include/std/std_streambuf.h (__copy_streambufs): Remove
	the first, unused, basic_ios<> parameter.
	* src/streambuf-inst.cc: Likewise.
	* include/bits/streambuf.tcc: Likewise.
	* include/bits/istream.tcc (operator>>(__streambuf_type*)):
	Tweak accordingly the call.
	* include/bits/ostream.tcc (operator<<(__streambuf_type*)):
	Likewise.

	* include/bits/streambuf.tcc (__copy_streambufs): Remove
	redundant try/catch.

From-SVN: r73992
2003-11-27 13:13:19 +00:00
Benjamin Kosnik 12841eb3d0 re PR libstdc++/9371 (Bad exception handling in i/ostream::operator>>/<<(streambuf*))
2003-11-26  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/9371
	PR libstdc++/9546
	PR libstdc++/10093
	PR libstdc++/10095
	* include/bits/basic_ios.h (basic_ios::setstate): Elide if goodbit.
	(basic_ios::_M_setstate): Consolidate common error handling code.
	* include/bits/basic_ios.tcc: Tweak.
	* include/bits/fstream.tcc: Tweak.
	* include/bits/istream.tcc: Use _M_setstate for common exception
	handling. Move setstate calls after catch.
	(basic_istream::tellg): Check for exceptions thrown by streambuf
	virtual functions.
	(basic_istream::seekg): Same.
	* include/bits/ostream.tcc: Same, but for ostream.
	(basic_ostream::flush): Check for exceptions thrown by streambuf
	virtual functions.
	(basic_istream::tellp): Same.
	(basic_istream::seekp): Same.
	* include/bits/locale_facets.tcc: Tweak.
	* include/bits/streambuf.tcc: Tweak.
	(__copy_streambufs): Propagate exceptions.
	* testsuite/testsuite_io.h (fail_streambuf): New.
	(fail_num_get): New.
	(fail_num_put): New.
	(facet_error): New.
	(underflow_error): New.
	(overflow_error): New.
	(positioning_error): New.
	* testsuite/27_io/basic_istream/exceptions/char/9561.cc: Tweak.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/
        exceptions_badbit_throw.cc, exceptions_failbit.cc,
        exceptions_failbit_throw.cc: New.
	* testsuite/27_io/basic_istream/extractors_other/char/
	error_failbit.cc, exceptions_badbit_throw.cc,
        exceptions_failbit_throw.cc, exceptions_null.cc: New.
	* testsuite/27_io/basic_istream/seekg/char/exceptions_badbit_throw.cc:
	New.
	* testsuite/27_io/basic_istream/tellg/char/exceptions_badbit_throw.cc:
	New.
	* testsuite/27_io/basic_ostream/flush/char/exceptions_badbit_throw.cc:
	New.
	* testsuite/27_io/basic_ostream/inserters_arithmetic/char/
	exceptions_badbit_throw.cc, exceptions_failbit_throw.cc: New.
	* testsuite/27_io/basic_ostream/inserters_other/char/
	error_failbit.cc, exceptions_badbit_throw.cc,
        exceptions_failbit_throw.cc, exceptions_null.cc: New.
	* testsuite/27_io/basic_ostream/seekp/char/exceptions_badbit_throw.cc:
	New.
	* testsuite/27_io/basic_ostream/tellp/char/exceptions_badbit_throw.cc:
	New.

From-SVN: r73979
2003-11-27 08:14:25 +00:00
Benjamin Kosnik 48f499cf81 re PR libstdc++/12297 (istream::sentry::sentry() handles eof() incorrectly.)
2003-11-26  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/12297
	* include/bits/istream.tcc
	(basic_istream::sentry::sentry): Set failbit and eofbit when eof.
	* testsuite/27_io/basic_istream/sentry/char/12297.cc: New.

From-SVN: r73968
2003-11-26 22:45:56 +00:00
Paolo Carlini c03d83d499 re PR libstdc++/13171 (Bugs in basic_filebuf::imbue)
2003-11-26  Paolo Carlini  <pcarlini@suse.de>
	    Petur Runolfsson  <peturr02@ru.is>

	PR libstdc++/13171
	* include/bits/fstream.tcc (imbue): Relax the conditions under
	which the function succeeds: allow for two consecutive calls with
	the same name; state dependent encodings are ok even after open
	if at the beginning of the file; don't check seekoff return value
	(pipes, cin, cout, etc...)
	* testsuite/27_io/basic_filebuf/imbue/char/13171-1.cc: New.
	* testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc: New.
	* testsuite/27_io/basic_filebuf/imbue/char/13171-3.cc: New.
	* testsuite/27_io/basic_filebuf/imbue/char/13171-4.cc: New.
	* testsuite/27_io/basic_filebuf/imbue/char/2.cc: Tweak comment.
	* testsuite/27_io/basic_filebuf/imbue/char/3.cc: Likewise.
	* testsuite/27_io/basic_filebuf/imbue/wchar_t/2.cc: Tweak comment.
	* testsuite/27_io/basic_filebuf/imbue/wchar_t/3.cc: Likewise.

	* testsuite/27_io/basic_filebuf/imbue/wchar_t/12868.cc: More
	correctly use the UTF-8 locale appearing in the PR.

Co-Authored-By: Petur Runolfsson <peturr02@ru.is>

From-SVN: r73954
2003-11-26 15:56:40 +00:00
Paolo Carlini 7fb1d71193 2003-11-26 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.h
	(__numpunct_cache<>::_M_cache): Avoid zeroing _M_grouping,
	_M_truename and _M_falsename: the constructor always does
	it immediately before the _M_cache call.

From-SVN: r73948
2003-11-26 11:47:01 +00:00
Paolo Carlini 5af91f0690 codecvt_members.cc (codecvt::do_length): Rewrite, using both mbsnrtowcs and mbrtowc in a loop...
2003-11-25  Paolo Carlini  <pcarlini@suse.de>

	* config/locale/gnu/codecvt_members.cc (codecvt::do_length):
	Rewrite, using both mbsnrtowcs and mbrtowc in a loop: the
	former is very fast, but stops if encounters a NUL.
	(codecvt::do_out): Tweaks.
	(codecvt::do_in): Tweaks, improve the code dealing with errors.
	* testsuite/performance/wchar_t_length.cc: New.

From-SVN: r73934
2003-11-25 21:41:28 +00:00
Paolo Carlini 3c8797ae81 codecvt_members.cc (codecvt::do_in): Rewrite, using both mbsnrtowcs and mbrtowc in a loop...
2003-11-24  Paolo Carlini  <pcarlini@suse.de>

	* config/locale/gnu/codecvt_members.cc (codecvt::do_in):
	Rewrite, using both mbsnrtowcs and mbrtowc in a loop: the
	former is very fast, but stops if encounters a NUL.
	(codecvt::do_out): Tweak.
	* testsuite/performance/wchar_t_in.cc: New.

2003-11-24  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.h
	(__numpunct_cache<>::_M_cache): Set _M_allocated at the beginning
	in order to avoid memory leaks; simplify a bit.

From-SVN: r73893
2003-11-24 21:13:38 +00:00
Benjamin Kosnik e0ec69c929 streambuf_iterator.h (ostreambuf_iterator): Remove non-standard throw specs.
2003-11-24  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/streambuf_iterator.h (ostreambuf_iterator): Remove
	non-standard throw specs.
	* testsuite/24_iterators/istreambuf_iterator.cc: Split into...
	* testsuite/24_iterators/istreambuf_iterator/1.cc
	* testsuite/24_iterators/istreambuf_iterator/2.cc
	* testsuite/24_iterators/istreambuf_iterator/2627.cc
	* testsuite/24_iterators/ostreambuf_iterator.cc: Split into...
	* testsuite/24_iterators/ostreambuf_iterator/1.cc
	* testsuite/24_iterators/ostreambuf_iterator/2.cc

	* testsuite/24_iterators/reverse_iterator/1.cc: Just compile,
	don't link.

	* include/bits/allocator.h: Formatting tweak.

From-SVN: r73892
2003-11-24 21:02:39 +00:00
Paolo Carlini ce492af354 locale_init.cc: Cosmetic reformatting.
2003-11-24  Paolo Carlini  <pcarlini@suse.de>

	* src/locale_init.cc: Cosmetic reformatting.

From-SVN: r73882
2003-11-24 17:24:40 +00:00
Paolo Carlini bf058d221e locale_facets.tcc (__add_grouping): Cosmetic reformatting.
2003-11-23  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (__add_grouping):
	Cosmetic reformatting.

From-SVN: r73854
2003-11-23 14:49:54 +00:00
Paolo Carlini 89a2fb9092 locale_facets.tcc (_M_extract_float, [...]): Remove a wrong comment and simplify the corresponding code using...
2003-11-23  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (_M_extract_float,
	_M_extract_int): Remove a wrong comment and simplify
	the corresponding code using char_traits::find().

From-SVN: r73853
2003-11-23 13:03:59 +00:00
Paolo Carlini cc0c2f7986 2003-11-22 Paolo Carlini <pcarlini@suse.de>
* config/locale/gnu/monetary_members.cc
	(money_base::_S_construct_pattern): Factor out two assignments.

From-SVN: r73844
2003-11-22 18:47:13 +00:00
Paolo Carlini a3b1b80447 istream.tcc (getline(basic_string<>&)): Fix error in comment of the previous commit.
2003-11-22  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/istream.tcc (getline(basic_string<>&)):
        Fix error in comment of the previous commit.

From-SVN: r73836
2003-11-22 11:41:41 +00:00
Paolo Carlini 1a311979dd re PR libstdc++/12593 (Resolution of DR 91 (WP) still unimplemented)
2003-11-22  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/12593
	* include/bits/istream.tcc (operator>>(basic_string<>&),
	getline(basic_string<>&)): Implement resolution of DR 91 [WP];
	fix some minor issues with the exit conditions.
	* docs/html/ext/howto.html: Add an entry for DR 91.

From-SVN: r73835
2003-11-22 09:54:25 +00:00
Paolo Carlini f7ba331c2a 2003-11-21 Paolo Carlini <pcarlini@suse.de>
* config/locale/gnu/monetary_members.cc
	(money_base::_S_construct_pattern): Factor out an assignment.

From-SVN: r73816
2003-11-21 20:55:49 +00:00
Paolo Carlini 5c89246dfb PR libstdc++/12882 (partial)
2003-11-21  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/12882 (partial)
	* acinclude.m4 (GLIBCXX_CHECK_LFS): Check fseeko64
	and ftello64 too.
	* include/ext/stdio_sync_filebuf.h (seekoff): Use fseeko64
	and ftello64 if available.
	* aclocal.m4: Regenerate.
	* configure: Ditto.

From-SVN: r73815
2003-11-21 20:30:12 +00:00
Benjamin Kosnik 9dc420e68d formatter.h: Use _Tp as template argument.
2003-11-20  Benjamin Kosnik  <bkoz@redhat.com>

	* include/debug/formatter.h: Use _Tp as template argument.
	* src/debug.cc: Same, instantiate std::size_t.

From-SVN: r73792
2003-11-21 05:49:21 +00:00
Benjamin Kosnik 4be58168d3 re PR libstdc++/13109 (libstdc++-v3 bootstrap failure on Tru64 UNIX V4.0F: snprintf missing)
2003-11-20  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/13109
	* include/debug/formatter.h (_Error_formatter::_M_format_word): New.
	* src/debug.cc (__gnu_debug): Format.
	(_Error_formatter::_M_format_word): Define, use, instantiate.

From-SVN: r73770
2003-11-20 19:32:13 +00:00
Paolo Carlini 0fd1870171 re PR libstdc++/11602 (codecvt<wchar_t, char, mbstate_t> is slow.)
2003-11-20  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/11602
	* config/locale/gnu/codecvt_members.cc (codecvt::do_out):
	Rewrite, using both wcsnrtombs and wcrtomb in a loop: the
	former is very fast, but stops if encounters a NUL.
	* testsuite/performance/wchar_t_out.cc: New, from the PR.

From-SVN: r73769
2003-11-20 19:24:03 +00:00
Paolo Carlini 1f33554abb codecvt_members.cc (do_out): If we can upper bound the total number of external chars to something smaller...
2003-11-19  Paolo Carlini  <pcarlini@suse.de>

	* config/locale/gnu/codecvt_members.cc (do_out): If
	we can upper bound the total number of external chars
	to something smaller than __to_end - __to, avoid the
	temporary buffer, the memcopy and simplify the loop.
	* config/locale/generic/codecvt_members.cc (do_out):
	Likewise.

From-SVN: r73733
2003-11-19 11:38:40 +00:00
Andreas Tobler 90635952d1 libstdc++.exp: Add DYLD_LIBRARY_PATH for darwin.
2003-11-19  Andreas Tobler  <a.tobler@schweiz.ch>

	* testsuite/lib/libstdc++.exp: Add DYLD_LIBRARY_PATH for darwin.
	* testsuite/libstdc++-dg/normal.exp: Add -multiply_defined suppress
	flag.

From-SVN: r73724
2003-11-19 05:51:18 +01:00
Jonathan Wakely bc225f98dd configopts.html, [...]: Add <link> tags.
2003-11-18  Jonathan Wakely  <redi@gcc.gnu.org>

	* docs/html/configopts.html, docs/html/debug.html,
	docs/html/documentation.html, docs/html/explanations.html,
	docs/html/install.html, docs/html/17_intro/contribute.html,
	docs/html/17_intro/howto.html, docs/html/17_intro/license.html,
	docs/html/18_support/howto.html, docs/html/19_diagnostics/howto.html,
	docs/html/20_util/howto.html, docs/html/21_strings/howto.html,
	docs/html/22_locale/codecvt.html, docs/html/22_locale/ctype.html,
	docs/html/22_locale/howto.html, docs/html/22_locale/locale.html,
	docs/html/22_locale/messages.html, docs/html/23_containers/howto.html,
	docs/html/24_iterators/howto.html, docs/html/25_algorithms/howto.html,
	docs/html/26_numerics/howto.html, docs/html/27_io/howto.html,
	docs/html/ext/howto.html, docs/html/ext/sgiexts.html: Add <link> tags.

From-SVN: r73712
2003-11-18 20:56:12 +00:00
Paolo Carlini 2934246345 re PR libstdc++/12868 (basic_filebuf::imbue fails too easily)
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.

From-SVN: r73697
2003-11-18 08:21:38 +00:00
Paolo Carlini c246639311 locale_facets.tcc: Fix typo in comment.
2003-11-17  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc: Fix typo in comment.

From-SVN: r73667
2003-11-17 08:54:09 +00:00
Paolo Carlini 6a7ee0d62e 8.cc: New test, summarizing the discussion ensuing libstdc++/12988.
2003-11-17  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/22_locale/num_put/put/char/8.cc: New test,
	summarizing the discussion ensuing libstdc++/12988.
	* testsuite/22_locale/num_put/put/wchar_t/8.cc: Ditto.

From-SVN: r73665
2003-11-17 08:39:57 +00:00
Paolo Carlini 781a529886 std_fstream.h: Tweak a comment.
2003-11-15  Paolo Carlini  <pcarlini@suse.de>

	* include/std/std_fstream.h: Tweak a comment.

From-SVN: r73640
2003-11-16 00:55:51 +00:00
Roger Sayle c85dfef7a0 std_cmath.h: Don't import C99's float transcendentals into the __gnu_cxx::__c99_binding...
* include/c_std/std_cmath.h: Don't import C99's float transcendentals
	into the __gnu_cxx::__c99_binding namespace.
	(acos, asin, atan, atan2, ceil, cosh, exp, floor, fmod, frexp,
	ldexp, log, log10, modf, pow, sinh, tan, tanh): Implement using
	GCC's math builtins, i.e. __builtin_foo.
	* libmath/stubs.c (acosf, acosl, asinf, asinl, atanf, atanl,
	ceilf, ceill, floorf, floorl, fmodf, fmodl, frexpf, frexpl,
	ldexpf, ldexpl, modff, modfl): Provide stub implementations.

From-SVN: r73629
2003-11-15 14:26:47 +00:00