Commit Graph

2903 Commits

Author SHA1 Message Date
Paolo Carlini b6cb8dc2d8 sso_string_base.h: Minor formatting and stylistic fixes.
2005-11-21  Paolo Carlini  <pcarlini@suse.de>

	* include/ext/sso_string_base.h: Minor formatting and stylistic fixes.
	(__sso_string_base<>::_M_get_allocator): Return by const ref.
	* include/ext/rc_string_base.h: Likewise.
	(__rc_string_base<>::_M_get_allocator): Return by const ref.
	(__rc_string_base<>::_M_dispose): Take void, use _M_get_allocator.
	(__rc_string_base<>::_M_grab): Take one alloc, use _M_get_allocator.
	(__rc_string_base<>::~__rc_string_base,
	__rc_string_base(const __rc_string_base&), _M_assign, _M_reserve,
	_M_mutate): Adjust.
	* include/ext/vstring_util.h: Minor stylistic fixes.

From-SVN: r107317
2005-11-21 18:38:05 +00:00
Paolo Carlini 7697e6c66a rc_string_base.h (__rc_string_base<>::_Rep): Avoid the anonymous struct extension, adjust everywhere.
2005-11-18  Paolo Carlini  <pcarlini@suse.de>

	* include/ext/rc_string_base.h (__rc_string_base<>::_Rep): Avoid the
	anonymous struct extension, adjust everywhere.

	* include/ext/rc_string_base.h (__rc_string_base<>::_S_empty_rep()):
	Just use a static member.
	(__rc_string_base<>::__rc_string_base(), _S_construct): Adjust.

	* include/ext/rc_string_base.h (__rc_string_base<>::_Rep): Use anonymous
	union together with _CharT to fix alignment issues, rebind to _Rep and
	rename _Raw_alloc to _Rep_alloc_type.
	(__rc_string_base<>::_Rep::_S_create, _M_destroy): Adjust consistently.

	* include/ext/vstring_util.h (__is_null_p): Move inside struct
	__vstring_utility as static _S_is_null_pointer.
	* include/ext/sso_string.h
	(__sso_string_base<>::_M_construct(std::forward_iterator_tag): Adjust.
	* include/ext/rc_string_base.h
	(__rc_string_base<>::_S_construct(std::forward_iterator_tag): Likewise.

	Implement Option 3 of DR 431 for ext/vstring - both available bases.
	* include/bits/cpp_type_traits.h (struct __is_empty): Add.
	* include/ext/vstring.h (__versa_string<>::swap): Delegate to
	this->_M_swap.
	* include/ext/vstring.tcc (__versa_string<>::swap): Remove.
	* include/ext/vstring_util.h (struct __vstring_utility<>): Add struct
	_Alloc_hider<>, augmented of allocator swapping facility, specialized
	to nop for empty allocators.
	* include/ext/rc_string_base.h (__rc_string_base<>::_M_swap): Use it.
	(__rc_string_base<>::_M_is_leaked, _M_set_sharable): Change to private.
	* include/ext/sso_string_base.h	(__sso_string_base<>::_M_swap):
	Likewise.
	(__sso_string_base<>::_M_is_leaked, _M_set_sharable): Remove, unused.	

	* include/ext/rc_string_base.h (__rc_string_base<>::_M_data(_CharT*):
	Return void.
	* include/ext/sso_string_base.h (__sso_string_base<>::_M_data(_CharT*):
	Likewise.

From-SVN: r107176
2005-11-18 11:50:22 +00:00
Paolo Carlini 81daf4baea [multiple changes]
2005-11-13  Jonathan Wakely  <redi@gcc.gnu.org>

	* include/tr1/boost_shared_ptr.h (get_deleter):
	Declare before shared_ptr.
	(shared_ptr<>): Declare get_deleter as friend.
	(shared_ptr<>:_M_get_deleter): Private.

2005-11-13  Douglas Gregor  <doug.gregor@gmail.com>

	PR libstdc++/24818
        * include/tr1/ref_wrap_iterate.h
        (reference_wrapper::operator()()): Don't dereferene the result of
        get() before calling it; it's already a reference.
        * testsuite/tr1/3_function_objects/reference_wrapper/invoke.cc:
        Test nullary calls to reference_wrappers.

From-SVN: r106863
2005-11-13 12:14:51 +00:00
Paolo Carlini 3270a66b55 [multiple changes]
2005-11-13  Jonathan Wakely  <redi@gcc.gnu.org>

	* include/tr1/boost_shared_ptr.h (get_deleter):
	Declare before shared_ptr.
	(shared_ptr<>): Declare get_deleter as friend.
	(shared_ptr<>:_M_get_deleter): Private.

2005-11-13  Douglas Gregor  <doug.gregor@gmail.com>

	PR libstdc++/24818
        * include/tr1/ref_wrap_iterate.h
        (reference_wrapper::operator()()): Don't dereferene the result of
        get() before calling it; it's already a reference.
        * testsuite/tr1/3_function_objects/reference_wrapper/invoke.cc:
        Test nullary calls to reference_wrappers.

From-SVN: r106862
2005-11-13 12:14:15 +00:00
Paolo Carlini 516ebd4486 re PR libstdc++/24808 (is_object fails to compile with incomplete types)
2005-11-11  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/24808
	* include/tr1/type_traits (__is_abstract_helper): Rename to __in_array
	(with complemented logic).
	(is_function): Use it, don't use __conv_helper.
	(is_abstract): Adjust.
	(__conv_helper): Rename to __is_convertible_simple.
	(is_convertible): Adjust.
	* testsuite/testsuite_tr1.h (class IncompleteClass): Add.
	* testsuite/tr1/4_metaprogramming/composite_type_traits/is_object/
	24808.cc: New.
	* testsuite/tr1/4_metaprogramming/primary_type_categories/is_enum/
	24808.cc: Likewise.
	* testsuite/tr1/4_metaprogramming/primary_type_categories/is_function/
	24808.cc: Likewise.

From-SVN: r106818
2005-11-12 00:19:24 +00:00
Paolo Carlini 77633f4cd0 re PR libstdc++/24799 (std::tr1::hash missing inheritance)
2005-11-11  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/24799
	* include/tr1/functional (hash): Inherit from std::unary_function.
	* testsuite/tr1/6_containers/unordered/hash/24799.cc: New.

	PR libstdc++/24805
	* include/tr1/boost_shared_ptr.h (swap(shared_ptr<>&, shared_ptr<>&),
	swap(weak_ptr<>&, weak_ptr<>&)): Move inside namespace tr1.
	* testsuite/tr1/2_general_utilities/memory/shared_ptr/modifiers/
	24805.cc: New.

	PR libstdc++/24809
	* include/tr1/type_traits (__is_polymorhpic_helper): Adjust destructor.
	* testsuite/tr1/4_metaprogramming/type_properties/is_polymorphic/
	24809.cc: New.

From-SVN: r106796
2005-11-11 20:10:20 +00:00
Paolo Carlini a15024e630 boost_shared_ptr.h (_Sp_counted_base::release, [...]): Protect barriers with __GTHREADS.
2005-11-10  Paolo Carlini  <pcarlini@suse.de>

	* include/tr1/boost_shared_ptr.h (_Sp_counted_base::release,
	weak_release): Protect barriers with __GTHREADS.

From-SVN: r106733
2005-11-10 12:03:50 +00:00
Paolo Carlini 7fd6021841 boost_shared_ptr.h (_Sp_counted_base::release): Optimize by manually inlining weak_release.
2005-11-10  Paolo Carlini  <pcarlini@suse.de>
	    Peter Dimov  <pdimov@mmltd.net>

	* include/tr1/boost_shared_ptr.h (_Sp_counted_base::release):
	Optimize by manually inlining weak_release.

	* include/tr1/boost_shared_ptr.h (_Sp_counted_base::release,
	weak_release): Use explicit memory barriers.

	

Co-Authored-By: Peter Dimov <pdimov@mmltd.net>

From-SVN: r106729
2005-11-10 10:46:27 +00:00
Paolo Carlini 8180951683 boost_shared_ptr.h: Trivial formatting fixes.
2005-11-09  Paolo Carlini  <pcarlini@suse.de>

	* include/tr1/boost_shared_ptr.h: Trivial formatting fixes.

From-SVN: r106689
2005-11-09 11:47:30 +00:00
Benjamin Kosnik 797308b2d1 libstdc++.exp (check_v3_target_debug_mode): Use exe as the executable extension.
2005-11-08  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/lib/libstdc++.exp (check_v3_target_debug_mode): Use
	exe as the executable extension.

	* acinclude.m4 (GLIBCXX_ENABLE_ALLOCATOR): Change gnu defaults to
	new.
	(GLIBCXX_ENABLE_PCH): Adjust message order.
	* configure: Regenerate.
	
	* scripts/testsuite_flags.in (query): Correct print_usagex typo.

	* include/bits/functexcept.h: Remove argument names.

	* src/mt_allocator.cc: Adjust comment.

From-SVN: r106665
2005-11-08 23:07:02 +00:00
Paolo Carlini 3a4983938c re PR libstdc++/18174 (documentation example for std::priority_queue usage)
2005-11-06  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/18174
	* include/bits/stl_queue.h (priority_queue): Tweak a bit the
	comment describing the container.

From-SVN: r106560
2005-11-06 13:07:11 +00:00
Paolo Carlini 4b90c838d2 re PR libstdc++/22203 (std::numeric_limits<int>::traps is wrong on PPC)
2005-11-05  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/22203
	* include/bits/c++config: Include cpu_defines.h.
	* include/Makefile.am: Add cpu_defines.h to host_headers.
	* configure.host: Add cpu_defines_dir.
	* configure.ac: Use it.
	* config/cpu/powerpc/cpu_defines.h: New.
	* config/cpu/generic/cpu_defines.h: Likewise.
	* configure: Regenerate.
	* Makefile.in: Likewise.
	* include/Makefile.in: Likewise.
	* libmath/Makefile.in: Likewise.
	* libsupc++/Makefile.in: Likewise.
	* po/Makefile.in: Likewise.
	* src/Makefile.in: Likewise.	
	* testsuite/Makefile.in: Likewise.

From-SVN: r106524
2005-11-05 09:42:01 +00:00
Paolo Carlini f9c4ee6d10 sso_string_base.h (__sso_string_base<>::_M_swap): Change the various traits_type::copy call to always copy the entire local buffer...
2005-11-03  Paolo Carlini  <pcarlini@suse.de>

	* include/ext/sso_string_base.h (__sso_string_base<>::_M_swap):
	Change the various traits_type::copy call to always copy the
	entire local buffer; return early and don't do a full swap on
	the lengths for two common cases; change two _S_copy to plain
	traits_type::copy.

From-SVN: r106431
2005-11-03 13:13:21 +00:00
Paolo Carlini 3d8aa000c3 [multiple changes]
2005-11-02  Thomas Kho  <tkho@ucla.edu>

	PR libstdc++/23425
	* include/bits/stl_vector.h (vector<>::clear): Open code
	in terms of _Destroy.

2005-11-02  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/vector.tcc (vector<>::_M_fill_assign): Qualify fill_n.

From-SVN: r106379
2005-11-02 10:27:54 +00:00
Paolo Carlini 2747345455 re PR libstdc++/24595 (std::tr1::get_deleter not declared)
2005-11-01  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/24595
	* include/tr1/boost_shared_ptr.h (shared_ptr<>::get_deleter):
	Move out of shared_ptr.
	* testsuite/tr1/2_general_utilities/memory/shared_ptr/misc/24595.cc:
	New.

From-SVN: r106321
2005-11-01 11:01:40 +00:00
Paolo Carlini 097588e4e4 re PR libstdc++/20213 (cassert header documentation wrong)
2005-10-30  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/20213
	* include/c_std/std_csignal.h: Adjust comment as per 17.4.1.2/4.
	* include/c_std/std_cstdlib.h: Likewise.
	* include/c_std/std_cstdio.h: Likewise.
	* include/c_std/std_cstdarg.h: Likewise.
	* include/c_std/std_cctype.h: Likewise.
	* include/c_std/std_cerrno.h: Likewise.
	* include/c_std/std_cmath.h: Likewise.
	* include/c_std/std_ciso646.h: Likewise.
	* include/c_std/std_ctime.h: Likewise.
	* include/c_std/std_clocale.h: Likewise.
	* include/c_std/std_climits.h: Likewise.
	* include/c_std/std_cassert.h: Likewise.
	* include/c_std/std_csetjmp.h: Likewise.
	* include/c_std/std_cwchar.h: Likewise.
	* include/c_std/std_cfloat.h: Likewise.
	* include/c_std/std_cstring.h: Likewise.
	* include/c_std/std_cstddef.h: Likewise.
	* include/c_std/std_cwctype.h: Likewise.

From-SVN: r106253
2005-10-30 22:21:50 +00:00
Paolo Carlini fcc8559226 re PR libstdc++/24559 (Incorrect definition of wcspbrk in cwchar)
2005-10-28  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/24559
	* include/c_std/std_cwchar.h (wcspbrk): Adjust signature.
	* testsuite/21_strings/c_strings/wchar_t/24559.cc: New.

From-SVN: r105939
2005-10-28 16:42:09 +00:00
Paolo Carlini 7058c3be1a sso_string_base.h (_M_swap): Rewrite.
2005-10-19  Paolo Carlini  <pcarlini@suse.de>

	* include/ext/sso_string_base.h (_M_swap): Rewrite.

From-SVN: r105654
2005-10-20 01:07:13 +00:00
Paolo Carlini 486516b60b rc_string_base.h (_S_terminal): Remove.
2005-10-19  Paolo Carlini  <pcarlini@suse.de>

	* include/ext/rc_string_base.h (_S_terminal): Remove.
	(_M_set_length): Adjust.
	(_S_max_size): Change to anonymous enum.
	(_M_max_size()): Add, returns the latter.
	* include/ext/sso_string_base.h: Likewise.
	* include/ext/vstring.h (max_size): Adjust.

From-SVN: r105616
2005-10-19 14:25:31 +00:00
Jonathan Wakely 7010f39ea6 re PR libstdc++/24244 (Problem with tr1::shared_ptr and pthreads_mutex_lock)
2005-10-17  Jonathan Wakely  <redi@gcc.gnu.org>

	PR libstdc++/24244
	* include/tr1/boost_shared_ptr.h (_Sp_counted_base::_Sp_counted_base()):
	When __GTHREAD_MUTEX_INIT is defined, initialize the mutex.

From-SVN: r105506
2005-10-17 17:23:42 +00:00
Paolo Carlini 48c410a254 functional: Add missing #pragma GCC system_header.
2005-10-15  Paolo Carlini  <pcarlini@suse.de>

	* include/tr1/functional: Add missing #pragma GCC system_header.

From-SVN: r105444
2005-10-15 19:46:58 +00:00
Paolo Carlini 76f5f4414f hashtable (hashtable::m_erase): Rename to erase_node.
2005-10-14  Paolo Carlini  <pcarlini@suse.de>

	* include/tr1/hashtable (hashtable::m_erase): Rename to erase_node.
	(hashtable::erase(iterator), erase(const_iterator)): Adjust.

From-SVN: r105401
2005-10-14 10:43:30 +00:00
Ian Lance Taylor 18c75543a8 re PR libstdc++/13583 (__use_cache not threadsafe)
PR libstdc++/13583
	* include/bits/locale_classes.h (locale::_Impl::_M_install_cache):
	Move out of line.
	* src/locale.cc: Define here, add mutex.
	* configure.ac (libtool_VERSION): To 6:7:0.
	* configure: Regenerate.
	* testsuite/testsuite_abi.cc (check_version): Add GLIBCXX_3.4.7.
	* config/linker-map.gnu: Export locale::_Impl::_M_install_cache.

From-SVN: r105221
2005-10-11 06:19:13 +00:00
Paolo Carlini 3c9b5053e0 PR libstdc++/24061 (issue 6.19)
2005-10-09  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/24061 (issue 6.19)
	* include/tr1/hashtable (struct node_const_iterator, struct
	hashtable_const_iterator): New, add const variants to enable separate
	overloadings for iterator and const_iterator in unordered_set and
	unordered_multiset (as required by issue 6.19).
	(class hashtable): Change the mutable_iterators template parameter
	to constant_iterators and adjust throughout the logic.
	(hashtable::insert(iterator, const value_type&), erase(iterator)
	erase(iterator, iterator)): New, as per issue 6.19.
	(hashtable::m_erase(node*, node**)): New, called by erase(iterator)
	and erase(const_iterator).
	(hashtable::Insert_Conv_Type): New, used by insert(iterator,
	const value_type&) and insert(const_iterator, const value_type&)
	to delegate the work to insert(const value_type&).
	* include/tr1/unordered_map (class unordered_map, unordered_multimap):
	Adjust typedefs.
	* include/tr1/unordered_set (class unordered_set, unordered_multiset):
	Likewise.
	* testsuite/tr1/6_containers/unordered/erase/24061-map.cc: New.
	* testsuite/tr1/6_containers/unordered/erase/24061-multimap.cc: New.
	* testsuite/tr1/6_containers/unordered/erase/24061-multiset.cc: New.
	* testsuite/tr1/6_containers/unordered/erase/24061-set.cc: New.
	* testsuite/tr1/6_containers/unordered/insert/24061-map.cc: New.
	* testsuite/tr1/6_containers/unordered/insert/24061-multimap.cc: New.
	* testsuite/tr1/6_containers/unordered/insert/24061-multiset.cc: New.
	* testsuite/tr1/6_containers/unordered/insert/24061-set.cc: New.

From-SVN: r105138
2005-10-09 10:34:47 +00:00
Paolo Carlini a5cee4808e Fix libstdc++/24196 for ext/vstring/rc by returning to the behavior of basic_string pre-2003-06-13...
2005-10-07  Paolo Carlini  <pcarlini@suse.de>

	Fix libstdc++/24196 for ext/vstring/rc by returning to the behavior
	of basic_string pre-2003-06-13; remove fully-dynamic-string stuff.
	* include/ext/rc_string_base.h (_M_refcopy): Move inside the
	_Rep class and remove code in macro.
	(__rc_string_base()): Construct with _S_empty_rep()._M_refcopy().
	(_M_dispose, _M_leak_hard): Remove code in macro.
	(_S_construct): Return _S_empty_rep()._M_refcopy() for empty string.
	(_M_grab): Adjust.

	* include/ext/rc_string_base.h (_Rep::_M_refdata()): Minor tweak,
	mark throw().

From-SVN: r105090
2005-10-07 15:55:17 +00:00
Paolo Carlini c54c1b2b52 sso_string_base.h (struct __sso_string_local): Remove...
2005-10-05  Paolo Carlini  <pcarlini@suse.de>

	* include/ext/sso_string_base.h (struct __sso_string_local):
	Remove, actually POD types cannot have user defined constructors
	(being aggregates) and therefore can always be members of unions.
	(class __sso_string_base): Adjust consistently.

From-SVN: r105021
2005-10-05 23:50:18 +00:00
Paolo Carlini c6ff194494 PR libstdc++/11729 (DR 280, [Ready])
2005-10-05  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/11729 (DR 280, [Ready])
	* include/bits/stl_iterator.h: Add reverse_iterator global
	functions with two template parameters (operator==, !=, <,
	>, <=, >=, -).
	* testsuite/24_iterators/reverse_iterator/11729.cc: New.
	* docs/html/ext/howto.html: Add an entry for issue 280.

From-SVN: r105000
2005-10-05 15:49:39 +00:00
Paolo Carlini d26e1ec86f hashtable (node_iterator::node_iterator(const node_iterator<,true,>&)): Fix to take a "false" (i.e., is_const == false) node_iterator.
2005-10-03  Paolo Carlini  <pcarlini@suse.de>

	* include/tr1/hashtable
	(node_iterator::node_iterator(const node_iterator<,true,>&)): Fix to
	take a "false" (i.e., is_const == false) node_iterator.
	(hashtable_iterator::hashtable_iterator(const hashtable_iterator<,
	true,>&)): Likewise for hashtable_iterator.
	(hashtable::const_local_iterator): Fix typedef (is_const == true).
	(hashtable::const_iterator): Likewise.
	* testsuite/tr1/6_containers/unordered/types/map_iterator.cc: New.
	* testsuite/tr1/6_containers/unordered/types/multimap_iterator.cc: New.
	* testsuite/tr1/6_containers/unordered/types/set_iterator.cc: New.
	* testsuite/tr1/6_containers/unordered/types/multiset_iterator.cc: New.

From-SVN: r104900
2005-10-03 17:35:55 +00:00
Paolo Carlini e7dbb3ee6b re PR libstdc++/24054 (std::tr1::unordered_map's erase does not seem to return a value)
2005-10-02  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/24054
	* include/tr1/hashtable (erase(const key_type&)): Return the
	number of elements erased.
	* testsuite/tr1/6_containers/unordered/hashtable/24054.cc: New.

From-SVN: r104867
2005-10-02 10:20:16 +00:00
Kenny Simpson cc6312c1e8 tuple_iterate.h (tuple::operator=(const std::pair<>&)): Add missing return.
2005-10-01  Kenny Simpson  <theonetruekenny@yahoo.com>

	* include/tr1/tuple_iterate.h (tuple::operator=(const std::pair<>&)):
	Add missing return.

From-SVN: r104851
2005-10-01 08:35:49 +00:00
Paolo Carlini 18048e65b0 re PR libstdc++/24064 (tr1::unordered_map seems to seg-fault when caching hash values)
2005-09-30  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/24064
	* include/tr1/hashtable (hash_code_base<>::store_code): Add.
	(hashtable<>::insert(const value_type&)): Use it.
	* testsuite/tr1/6_containers/unordered/hashtable/24064.cc: New.

From-SVN: r104823
2005-09-30 16:54:54 +00:00
Paolo Carlini eae6e95b7f re PR libstdc++/23953 (using stringstreams causes crashes with some locales)
2005-09-30  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/23953
	* include/bits/locale_facets.tcc (__numpunct_cache<>::_M_cache,
	__moneypunct_cache<>::_M_cache): Check that grouping()[0] > 0.
	(__verify_grouping): Do the last check only if __grouping[__min] > 0.
	(__add_grouping<>): End recursion if *__gbeg <= 0.
	* testsuite/22_locale/num_get/get/char/23953.cc: New.
	* testsuite/22_locale/num_get/get/wchar_t/23953.cc: Likewise.
	* testsuite/22_locale/num_put/put/char/23953.cc: Likewise.
	* testsuite/22_locale/num_put/put/wchar_t/23953.cc: Likewise.

From-SVN: r104814
2005-09-30 08:39:52 +00:00
Chris Jefferson 2bd8e92c33 re PR libstdc++/23978 (tr1::tie doesn't work with std::pair)
2005-09-29  Chris Jefferson <chris@bubblescope.net>

	PR libstdc++/23978
	* include/tr1/functional (ref, cref): Make inline.
	* include/tr1/tuple_iterate.h (tuple): Add operator=(std::pair).
	(tie): Correct formatting.
	(make_tuple): Make inline.
	* testsuite/tr1/6_containers/tuple/creation_functions/23978.cc: New.

From-SVN: r104784
2005-09-29 17:42:42 +00:00
Benjamin Kosnik 4bd2f9d6a1 2005-09-25 Benjamin Kosnik <bkoz@redhat.com>
Eric Botcazou  <ebotcazou@libertysurf.fr>

	* include/ext/mt_allocator.h
	(__per_type_pool<...true>::_S_initialize_once): Always call
	_M_initialize_once.
	(__common_pool<...true>::_S_initialize_once): Same.

Co-Authored-By: Eric Botcazou <ebotcazou@libertysurf.fr>

From-SVN: r104678
2005-09-27 01:40:46 +00:00
Guillaume Melquiond fa5e3f0675 re PR libstdc++/23956 (Class __mt_alloc overexerts __policy_type::_S_get_pool)
2005-09-21  Guillaume Melquiond  <guillaume.melquiond@ens-lyon.fr>

	PR libstdc++/23956
	* include/ext/mt_allocator.h: Remove excess
	policy_type::_S_get_pool calls in constructors.

From-SVN: r104520
2005-09-22 08:48:31 +00:00
Paolo Carlini 3d480e2f81 PR libstdc++/23417 (cont)
2005-09-18  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/23417 (cont)
	* include/bits/stl_tree.h (_Rb_tree_impl<true>): Use member
	initialization list for -Weffc++.

From-SVN: r104401
2005-09-18 13:39:25 +00:00
Benjamin Kosnik 451e92db80 re PR libstdc++/21674 (basic_string vs debug_mode)
2005-09-15  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/21674
	PR libstdc++/22205
	PR libstdc++/22222
	* include/bits/c++config: Set _GLIBCXX_STD regardless of __GXX_WEAK__.
	Add in check for __NO_INLINE__ for warning.
	* testsuite/lib/dg-options.exp (dg-require-debug-mode): New.
	* testsuite/lib/libstdc++.exp (check_v3_target_debug_mode): New.
	* testsuite/21_strings/basic_string/element_access/char/21674.cc:
	Use it.
	* testsuite/21_strings/basic_string/element_access/wchar_t/21674.cc:
	Use it.

From-SVN: r104314
2005-09-15 18:58:02 +00:00
Paolo Carlini f4ca8e2772 re PR libstdc++/23875 (operator<<(short) should not call operator<<(long), etc.)
2005-09-15  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/23875
	* include/std/std_ostream.h (operator<<(short), operator<<(unsigned
	short), operator<<(int), operator<<(unsigned int), operator<<(float)):
	Don't call operator<<(long), operator<<(unsigned long), or
	operator<<(double), do the work mandated by the resolution of DR117...
	* include/bits/ostream.tcc (operator<<(short), operator<<(unsigned
	short), operator<<(int), operator<<(unsigned int), operator<<(float)):
	... here.
	* testsuite/27_io/basic_ostream/inserters_arithmetic/pod/23875.cc: New.

From-SVN: r104313
2005-09-15 17:27:23 +00:00
David Edelsohn 00ff8e1926 re PR libstdc++/22554 (pb_assoc header build and install overflows exec)
2005-09-12  David Edelsohn  <dje@gcc.gnu.org>

	PR libstdc++/22554
	PR libstdc++/23734
	* include/Makefile.am (stamp-assoc): Install each subgroup
	of headers separately.
	* include/Makefile.in: Regenerate.

From-SVN: r104238
2005-09-13 19:22:52 +00:00
Benjamin Kosnik c35a51a54e re PR libstdc++/22554 (pb_assoc header build and install overflows exec)
2005-09-12  Benjamin Kosnik  <bkoz@redhat.com>
	    David Edelsohn <dje@gcc.gnu.org>

	PR libstdc++/22554
	PR libstdc++/23734
	* include/Makefile.am (assoc_headers): Break into five sub values.
	(install-headers): Use them.
	(stamp-assoc): Same.
	* include/Makefile.in: Regenerate.

From-SVN: r104196
2005-09-12 23:09:41 +00:00
Paolo Carlini b35c082263 [multiple changes]
2005-09-12  Chris Jefferson  <chris@bubblescope.net>

	* include/bits/stl_algo.h (search_n): Delegate to specializations.
	(search_n(,,,,binary_predicate)): Likewise.
        (__search_n(forward_iterator_tag)): Original search_n, tweak to
        remove an unnecessary comparison.
        (__search_n(,,,,binary_predicate,forward_iterator_tag)): Likewise.

2005-09-12  Jim Xochellis  <jimxoch@yahoo.gr>

        * include/bits/stl_algo.h (__search_n(std::random_access_iterator_tag)):
	Add specialization.
        (__search_n(,,,,binary_predicate,std::random_access_iterator_tag)):
        Likewise.

From-SVN: r104192
2005-09-12 21:13:04 +00:00
Benjamin Kosnik dda6e8cd3a re PR libstdc++/23417 (bits/stl_tree.h isn't -Weffc++ clean)
2005-09-12  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/23417
	* include/bits/stl_list.h (_List_impl): Use member initialization
	list for -Weffc++.
	* include/bits/stl_tree.h (_Rb_tree_impl): Same.

From-SVN: r104191
2005-09-12 20:32:54 +00:00
Benjamin Kosnik dbc564aea3 re PR libstdc++/23417 (bits/stl_tree.h isn't -Weffc++ clean)
2005-09-12  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/23417
	* include/bits/stl_list.h (_List_impl): Use member initialization
	list for -Weffc++.

From-SVN: r104187
2005-09-12 19:48:04 +00:00
Paolo Carlini 2bcec7298e re PR libstdc++/23767 (std::vector iterator implementation wrong)
2005-09-12  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/23767
	* include/bits/stl_iterator.h (__normal_iterator::
	__normal_iterator<>(const __normal_iterator<_Iter, _Container>&)):
	Enable only when _Iter is equal to _Container::pointer.
	* testsuite/21_strings/basic_string/types/23767.cc: New.
	* testsuite/23_containers/vector/types/23767.cc: Likewise.
	* testsuite/ext/vstring/types/23767.cc: Likewise.

From-SVN: r104167
2005-09-12 09:42:34 +00:00
Benjamin Kosnik 2f9f6cef1c [multiple changes]
2005-09-11  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/19265
	PR libstdc++/22309
	* include/ext/mt_allocator.h
	(__gnu_cxx::__create_handler): Remove.
	(__pool<true>::_M_destroy_thread_key): Compatibility only.
	(__pool<true>::_M_initialize(__destroy): Same.
	(__pool<true>::_M_initialize): New.
	(__pool<true>::_M_initialize_once): Nothing fancy.
	(__pool<true>::_M_once): Remove.
	(__common_pool): New.
	(__common_pool_base): New.
	(__per_type_pool): New.
	(__per_type_pool_base): New.
	* src/mt_allocator.cc: Same.
	* config/linker-map.gnu (__pool<true>::_M_initialize()): Add.

2005-09-11  Jakub Jelinek  <jakub@redhat.com>

	PR libstdc++/19265
	PR libstdc++/22309
	* src/mt_allocator.cc (__gnu_internal::freelist_mutex): Make static.
	(__gnu_internal::__freelist): New type.
	(__gnu_internal::freelist): New variable.
	(__gnu_internal::_M_destroy_thread_key): New function.
	(__gnu_cxx::__pool<true>::_M_destroy): Don't delete
	_M_thread_freelist_initial.
	(__gnu_cxx::__pool<true>::_M_initialize): Make argument nameless.
	Don't use _M_thread_freelist and _M_thread_freelist_initial
	__pool<true> fields, instead use __gnu_internal::freelist fields, call
	gthread_key_create just once.  Use
	__gnu_internal::_M_destroy_thread_key as key destructor.
	(__gnu_cxx::__pool<true>::_M_get_thread_id): Store size_t id
	rather than _Thread_record* in the thread specific value.  Don't
	use _M_thread_freelist __pool<true> field, instead use
	__gnu_internal::freelist fields.
	(__gnu_cxx::__pool<true>::_M_destroy_thread_key): Do nothing.

2005-09-11  Benjamin Kosnik  <bkoz@redhat.com>
            Jakub Jelinek  <jakub@redhat.com>

	PR libstdc++/19265
	PR libstdc++/22309
	* testsuite/testsuite_shared.cc: New.
	* testsuite/lib/dg-options.exp (dg-require-sharedlib): New.
	* testsuite/lib/libstdc++.exp (libstdc++_init): Look for shared
	library, and set v3-sharedlib based on this.
	(check_v3_target_sharedlib): New.
	(proc v3-build_support): Build shared objects.
	* testsuite/ext/mt_allocator/22309_thread.cc: New, use above.

From-SVN: r104161
2005-09-12 04:49:11 +00:00
Paolo Carlini e182017e46 re PR libstdc++/23781 (Implicit conversion from NULL to list<T>::iterator)
2005-09-11  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/23781
	* include/bits/stl_list.h (_List_iterator<>::
	_List_iterator(_List_node_base*), _List_const_iterator<>::
	_List_const_iterator(const _List_node_base*)): Make explicit.
	(list<>::begin(), list<>::end(), list<>::pop_back()): Adjust
	consistently.
	* include/bits/list.tcc (list<>::insert, list<>::erase): Adjust
	consistently.
	* include/bits/stl_tree.h (_Rb_tree_iterator<>::
	_Rb_tree_iterator(_Link_type), _Rb_tree_const_iterator<>::
	_Rb_tree_const_iterator(_Link_type)): Make explicit.
	(_Rb_tree<>::begin(), _Rb_tree<>::end()): Adjust consistently.
	* include/ext/slist (_Slist_iterator<>::_Slist_iterator(_Node*)):
	Make explicit.
	(slist<>::erase(iterator), slist<>::erase(iterator, iterator)):
	Adjust consistently.
	* include/tr1/hashtable (hashtable_iterator<>::
	hashtable_iterator(hash_node<>**)): Make explicit.
	* testsuite/23_containers/list/23781.cc: New.
	* testsuite/23_containers/map/23781.cc: Likewise.
	* testsuite/23_containers/multimap/23781.cc: Likewise.
	* testsuite/23_containers/multiset/23781.cc: Likewise.
	* testsuite/23_containers/set/23781.cc: Likewise.
	* testsuite/ext/slist/23781.cc: Likewise.
	* testsuite/tr1/6_containers/unordered/23781.cc: Likewise.
	* testsuite/23_containers/map/operators/1_neg.cc: Adjust dg-error
	line numbers.
	* testsuite/23_containers/set/operators/1_neg.cc: Likewise.

	* include/tr1/array (array<>::begin(), array<>::end()): Adjust
	stylistically for consistency with the other containers.

From-SVN: r104139
2005-09-11 09:48:41 +00:00
Benjamin Kosnik 4eafe88212 std_cmath.h: Declare C99 functions and helper functions as inline.
2005-09-01  Benjamin Kosnik  <bkoz@redhat.com>

	* include/c_std/std_cmath.h: Declare C99 functions and helper
	functions as inline.

From-SVN: r103747
2005-09-01 20:59:31 +00:00
Benjamin Kosnik d42a11e122 std_cmath.h: Declare C99 functions and helper functions as inline.
2005-09-01  Benjamin Kosnik  <bkoz@redhat.com>

	* include/c_std/std_cmath.h: Declare C99 functions and helper
	functions as inline.

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

From-SVN: r103743
2005-09-01 20:46:47 +00:00
Paolo Carlini e6494c9434 re PR libstdc++/23632 (std::vector<bool> in combination with debug mode fails to compile code)
2005-08-31  Paolo Carlini  <pcarlini@suse.de>
	    Kaspar Fischer <fischerk@inf.ethz.ch>

	PR libstdc++/23632
	* include/bits/stl_bvector.h (_Bit_iterator::operator[],
	_Bit_const_iterator::operator[]): Const-ify.
	* testsuite/23_containers/vector/bool/23632.cc: New.

Co-Authored-By: Kaspar Fischer <fischerk@inf.ethz.ch>

From-SVN: r103686
2005-08-31 17:01:57 +00:00
Paolo Carlini 5038e0988e PR libstdc++/23578 (cont)
2005-08-30  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/23578 (cont)
	* include/bits/stl_bvector.h (class vector<bool>): Add
	a dummy data() to avoid problems in debug-mode.

From-SVN: r103641
2005-08-30 15:49:15 +00:00