Commit Graph

2554 Commits

Author SHA1 Message Date
Benjamin Kosnik 3dd50c745b 9555-ic.cc: Clarify assertion, set test variable to false before assert.
2004-04-19  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/27_io/basic_istream/extractors_character/char/9555-ic.cc:
	Clarify assertion, set test variable to false before assert.
	* testsuite/27_io/basic_istringstream/str/char/1.cc: Same.
	* testsuite/27_io/basic_stringstream/str/char/1.cc: Same.
	* testsuite/27_io/ios_base/storage/2.cc: Same.

	* testsuite/27_io/basic_filebuf/imbue/char/13171-4.cc: Fix
	function returns.
	* testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-3.cc: Same.
	* testsuite/27_io/fpos/14320-3.cc: Same.

	* testsuite/27_io/basic_filebuf/2.cc: Instantiate in namespace std.
	* testsuite/27_io/fpos/1.cc: Same.
	* testsuite/27_io/basic_stringstream/2.cc: Same.
	* testsuite/27_io/basic_stringbuf/4.cc: Same.
	* testsuite/27_io/basic_stringbuf/1.cc: Same.
	* testsuite/27_io/basic_stringbuf/2.cc: Same.
	* testsuite/27_io/basic_streambuf/2.cc: Same.
	* testsuite/27_io/basic_ostringstream/2.cc: Same.
	* testsuite/27_io/basic_ostream/2.cc: Same.
	* testsuite/27_io/basic_ofstream/2.cc: Same.
	* testsuite/27_io/basic_istringstream/2.cc: Same.
	* testsuite/27_io/basic_istream/2.cc: Same.
	* testsuite/27_io/basic_iostream/2.cc: Same.
	* testsuite/27_io/basic_ios/2.cc: Same.
	* testsuite/27_io/basic_ifstream/2.cc: Same.
	* testsuite/27_io/basic_fstream/2.cc: Same.
	* testsuite/ext/stdio_filebuf/char/1.cc: Same, in namespace __gnu_cxx.

	* testsuite/21_strings/basic_string/capacity/1.cc: Don't compare
	unsigned against zero.
	* testsuite/21_strings/basic_string/capacity/wchar_t/1.cc: Same.
	* testsuite/21_strings/basic_string/capacity/char/1.cc: Same.

	* testsuite/18_support/new_delete_placement.cc: Initialize
	variables before first use.
	* testsuite/21_strings/char_traits/requirements/wchar_t/1.cc: Same.
	* testsuite/21_strings/char_traits/requirements/char/1.cc: Same.
	* testsuite/21_strings/char_traits/requirements/short/1.cc: Same.
	* testsuite/27_io/basic_istream/seekg/char/exceptions_badbit_throw.cc:
	Same.
	* testsuite/27_io/basic_ostream/inserters_arithmetic/char/exceptions_badbit_throw.cc: Same.
	* testsuite/27_io/basic_ostream/seekp/char/exceptions_badbit_throw.cc:
	Same.
	* testsuite/27_io/basic_ostream/inserters_arithmetic/char/exceptions_failbit_throw.cc: Same.
	* testsuite/27_io/types/2.cc: Same.

	* testsuite/ext/stdio_sync_filebuf/wchar_t/12077.cc: Fix temporary
	file name.
	* testsuite/27_io/fpos/14775.cc: Same.

From-SVN: r80861
2004-04-19 19:00:09 +00:00
Paolo Carlini 41b8e86c9a PR libstdc++/15002 (partial)
2004-04-19  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/15002 (partial)
	* include/bits/basic_string.h (_M_replace_aux, _M_replace_safe):
	Special case __n2 == 1, not calling traits_type::assign/copy.

From-SVN: r80847
2004-04-19 11:30:20 +00:00
Benjamin Kosnik f178c2d695 stl_bvector.h: Use _M_impl._M_start.
2004-04-17  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/stl_bvector.h: Use _M_impl._M_start.

From-SVN: r80811
2004-04-18 05:04:58 +00:00
Benjamin Kosnik 390e4c0dbe c++config (_GLIBCXX_STD): New.
2004-04-16  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/c++config (_GLIBCXX_STD): New.
	* src/list.cc: Use it.
	* include/std/std_bitset.h: Same.
	* include/bits/vector.tcc: Same.
	* include/bits/stl_set.h: Same.
	* include/bits/stl_multiset.h: Same.
	* include/bits/stl_multimap.h: Same.
	* include/bits/stl_map.h: Same.
	* include/bits/stl_list.h: Same.
	* include/bits/stl_vector.h: Same.
	* include/bits/stl_bvector.h: Same.
	* include/bits/stl_deque.h: Same.
	* include/bits/deque.tcc: Same.
	* include/bits/list.tcc: Same.
	* include/debug/vector: Same.
	* include/debug/set.h: Same.
	* include/debug/multiset.h: Same.
	* include/debug/multimap.h: Same.
	* include/debug/map.h: Same.
	* include/debug/list: Same.
	* include/debug/deque: Same.
	* include/debug/bitset: Same.
	* include/debug/formatter.h (__gnu_debug): Remove using directive.
	Add using declaration for std::type_info.
	* include/debug/safe_iterator.h: Add using declaration for
	std::iterator_traits and std::pair.
	* src/debug_list.cc: New.
	* src/Makefile.am: Add debug_list.cc.
	* src/Makefile.in: Regenerate.
	* config/linker-map.gnu: Add _List_node_base exports for std and
	__gnu_norm.

	* include/bits/stl_bvector.h (_Bvector_base): Use _Bvector_impl
	idiom that other containers use.
	* testsuite/23_containers/vector/bool/clear_allocator.cc: New.

From-SVN: r80763
2004-04-16 19:04:07 +00:00
Paolo Carlini 2f228199b9 re PR libstdc++/14975 ([3.4 only] Segfault on low-level write error during imbue)
2004-04-16  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/14975
	* include/bits/fstream.tcc (basic_filebuf::imbue): Zero _M_codecvt
	in case of error.
	* testsuite/27_io/basic_filebuf/imbue/char/14975-1.cc: New.
	* testsuite/27_io/basic_filebuf/imbue/wchar_t/14975-2.cc: New.

From-SVN: r80753
2004-04-16 16:06:21 +00:00
Paolo Carlini af55af57e1 acconfig.h: Remove _GLIBCXX_USE_LONG_DOUBLE entry, not used anymore.
2004-04-16  Paolo Carlini  <pcarlini@suse.de>

	* acconfig.h: Remove _GLIBCXX_USE_LONG_DOUBLE entry, not
	used anymore.
	* config.h.in: Regenerate.

2004-04-16  Paolo Carlini  <pcarlini@suse.de>

	* config/locale/generic/monetary_members.cc
	(moneypunct<wchar_t>::_M_initialize_moneypunct): Avoid calling
	btowc unnecessarily, just cast to wchar_t (the concerned chars
	all belong to the basic character set).
	* config/locale/generic/numeric_members.cc
	(numpunct<wchar_t>::_M_initialize_numpunct): Likewise.
	* config/locale/gnu/monetary_members.cc
	(moneypunct<wchar_t>::_M_initialize_moneypunct): Likewise.
	* config/locale/gnu/numeric_members.cc
	(numpunct<wchar_t>::_M_initialize_numpunct): Likewise.

From-SVN: r80746
2004-04-16 09:23:05 +00:00
Paolo Carlini d7ed521ba9 locale.cc (locale::operator==): When _M_impl == __rhs._M_impl avoid constructing unnecessarily this->name().
2004-04-15  Paolo Carlini  <pcarlini@suse.de>

	* src/locale.cc (locale::operator==): When _M_impl == __rhs._M_impl
	avoid constructing unnecessarily this->name().

From-SVN: r80714
2004-04-15 08:27:29 +00:00
Zack Weinberg 76e9802c68 Makefile.am: Add definition of AM_CXXFLAGS.
* testsuite/Makefile.am: Add definition of AM_CXXFLAGS.
	Change definition of CXX to use $(shell) instead of backticks.
	* testsuite/Makefile.in: Regenerate.

From-SVN: r80693
2004-04-14 21:10:52 +00:00
Dhruv Matani e0fb1c5c37 list_sort_search.cc: Minor formatting fixes.
2004-04-12  Dhruv Matani  <dhruvbird@gmx.net>

	* testsuite/performance/20_util/allocator/list_sort_search.cc:
	Minor formatting fixes.
	* testsuite/performance/20_util/allocator/map_mt_find.cc:
	Likewise.

From-SVN: r80624
2004-04-12 16:11:21 +00:00
Paolo Carlini 92861ad4a0 2004-04-12 Paolo Carlini <pcarlini@suse.de>
* config/locale/gnu/numeric_members.cc
	(numpunct<wchar_t>::_M_initialize_numpunct): No need to wrap
	in __uselocale, since btowc is called for chars belonging to
	the basic character set.

From-SVN: r80618
2004-04-12 08:36:23 +00:00
Paolo Carlini 895510be6f 1.cc: Remove junk.
2004-04-09  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/22_locale/messages/members/char/1.cc: Remove junk.
	* testsuite/22_locale/messages/members/char/2.cc: Ditto.
	* testsuite/22_locale/messages/members/char/3.cc: Ditto.
	* testsuite/22_locale/num_get/get/char/1.cc: Ditto.
	* testsuite/22_locale/num_get/get/char/2.cc: Ditto.
	* testsuite/22_locale/num_get/get/char/3.cc: Ditto.
	* testsuite/22_locale/num_get/get/wchar_t/1.cc: Ditto.
	* testsuite/22_locale/num_get/get/wchar_t/2.cc: Ditto.
	* testsuite/22_locale/num_get/get/wchar_t/3.cc: Ditto.
	* testsuite/22_locale/num_put/put/char/1.cc: Ditto.
	* testsuite/22_locale/num_put/put/char/2.cc: Ditto.
	* testsuite/22_locale/num_put/put/char/3.cc: Ditto.
	* testsuite/22_locale/num_put/put/wchar_t/1.cc: Ditto.
	* testsuite/22_locale/num_put/put/wchar_t/2.cc: Ditto.
	* testsuite/22_locale/num_put/put/wchar_t/3.cc: Ditto.
	* testsuite/22_locale/numpunct/members/char/1.cc: Ditto.
	* testsuite/22_locale/numpunct/members/wchar_t/1.cc: Ditto.

From-SVN: r80545
2004-04-09 10:18:33 +00:00
Paolo Carlini ba98a8d81a time_members.cc (__timepunct<char>::_M_initialize_timepunct, [...]): the correct _M_amonth07 in the "C" locale is "Jul" and L"Jul", respectively.
2004-04-07  Paolo Carlini  <pcarlini@suse.de>

	* config/locale/generic/time_members.cc
	(__timepunct<char>::_M_initialize_timepunct,
	__timepunct<wchar_t>::_M_initialize_timepunct): the correct
	_M_amonth07 in the "C" locale is "Jul" and L"Jul", respectively.
	* config/locale/gnu/time_members.cc
	(__timepunct<char>::_M_initialize_timepunct,
	__timepunct<wchar_t>::_M_initialize_timepunct): Ditto.
	* testsuite/22_locale/time_get/get_monthname/char/4.cc: New.
	* testsuite/22_locale/time_get/get_monthname/wchar_t/4.cc: New.

	* testsuite/22_locale/time_get/date_order/char/1.cc: Remove junk.
	* testsuite/22_locale/time_get/date_order/wchar_t/1.cc: Ditto.
	* testsuite/22_locale/time_get/get_date/char/1.cc: Ditto.
	* testsuite/22_locale/time_get/get_date/char/2.cc: Ditto.
	* testsuite/22_locale/time_get/get_date/wchar_t/1.cc: Ditto.
	* testsuite/22_locale/time_get/get_date/wchar_t/2.cc: Ditto.
	* testsuite/22_locale/time_get/get_monthname/char/1.cc: Ditto.
	* testsuite/22_locale/time_get/get_monthname/char/2.cc: Ditto.
	* testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc: Ditto.
	* testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc: Ditto.
	* testsuite/22_locale/time_get/get_time/char/1.cc: Ditto.
	* testsuite/22_locale/time_get/get_time/char/2.cc: Ditto.
	* testsuite/22_locale/time_get/get_time/wchar_t/1.cc: Ditto.
	* testsuite/22_locale/time_get/get_time/wchar_t/2.cc: Ditto.
	* testsuite/22_locale/time_get/get_weekday/char/1.cc: Ditto.
	* testsuite/22_locale/time_get/get_weekday/char/2.cc: Ditto.
	* testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc: Ditto.
	* testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc: Ditto.
	* testsuite/22_locale/time_get/get_year/char/1.cc: Ditto.
	* testsuite/22_locale/time_get/get_year/wchar_t/1.cc: Ditto.
	* testsuite/22_locale/time_put/put/char/1.cc: Ditto.
	* testsuite/22_locale/time_put/put/char/2.cc: Ditto.
	* testsuite/22_locale/time_put/put/char/3.cc: Ditto.
	* testsuite/22_locale/time_put/put/char/4.cc: Ditto.
	* testsuite/22_locale/time_put/put/char/5.cc: Ditto.
	* testsuite/22_locale/time_put/put/char/6.cc: Ditto.
	* testsuite/22_locale/time_put/put/char/7.cc: Ditto.
	* testsuite/22_locale/time_put/put/char/8.cc: Ditto.
	* testsuite/22_locale/time_put/put/wchar_t/1.cc: Ditto.
	* testsuite/22_locale/time_put/put/wchar_t/2.cc: Ditto.
	* testsuite/22_locale/time_put/put/wchar_t/3.cc: Ditto.
	* testsuite/22_locale/time_put/put/wchar_t/4.cc: Ditto.
	* testsuite/22_locale/time_put/put/wchar_t/5.cc: Ditto.
	* testsuite/22_locale/time_put/put/wchar_t/6.cc: Ditto.
	* testsuite/22_locale/time_put/put/wchar_t/7.cc: Ditto.
	* testsuite/22_locale/time_put/put/wchar_t/8.cc: Ditto.

	* testsuite/22_locale/time_put/put/char/9780-1.cc: Fix typos.

From-SVN: r80493
2004-04-07 23:14:08 +00:00
Paolo Carlini f332a090b2 2004-04-07 Paolo Carlini <pcarlini@suse.de>
* config/locale/gnu/monetary_members.cc
	(moneypunct<wchar_t>::_M_initialize_moneypunct): Prefer
	_NL_MONETARY_DECIMAL_POINT_WC, _NL_MONETARY_THOUSANDS_SEP_WC,
	and __MON_GROUPING to _NL_NUMERIC_DECIMAL_POINT_WC,
	_NL_NUMERIC_THOUSANDS_SEP_WC, and GROUPING.
	* config/locale/gnu/numeric_members.cc
	(numpunct<char>::_M_initialize_numpunct): Prefer DECIMAL_POINT
	and THOUSANDS_SEP to the deprecated RADIXCHAR and THOUSEP.

From-SVN: r80477
2004-04-07 14:32:47 +00:00
Benjamin Kosnik 563ae04fec Fixups for EDG front end.
2004-04-06  Benjamin Kosnik  <bkoz@redhat.com>

	Fixups for EDG front end.
	* include/ext/rope: Instead of non-existent function
	_Data_allocate, use allocator's allocate. Use this.
	(namespace _Rope_constants): Move _S_max_rope_depth, and _Tag
	enumerations from _Rope_RopeRep here.
	* include/ext/ropeimpl.h: Same.
	* src/ext-inst.cc (_S_min_len): Fix up definition.

	* config/locale/gnu/ctype_members.cc: Qualify base class members
	with this.
	* config/locale/generic/ctype_members.cc: Same.
	* config/locale/gnu/messages_members.h: Same.
	* config/locale/generic/messages_members.h: Same.
	* src/ctype.cc: Same.
	* include/bits/codecvt.h: Same.

	* include/bits/boost_concept_check.h: Declare.
	(__error_type_must_be_an_unsigned_integer_type): Remove this.
	(__error_type_must_be_an_integer_type): Remove this.
	(__error_type_must_be_a_signed_integer_type): Remove this.

	* config/io/basic_file_stdio.cc (__basic_file::sys_open): Remove cast.

	* libsupc++/eh_alloc.cc (__cxa_free_exception): Add exception
	specification to definition.
	(__cxa_allocate_exception): Same.
	* libsupc++/eh_catch.cc (__cxa_begin_catch): Same.
	* libsupc++/eh_globals.cc (__cxa_get_globals_fast): Same.
	(__cxa_get_globals): Same.

	* libsupc++/del_op.cc: Add comment about freestanding.

From-SVN: r80475
2004-04-07 03:33:36 +00:00
Paolo Carlini 268d3b1832 mt_allocator.h (__mt_alloc<>::deallocate): The critical section is actually very small, only two assignments.
2004-04-05  Paolo Carlini  <pcarlini@suse.de>

	* include/ext/mt_allocator.h (__mt_alloc<>::deallocate):
	The critical section is actually very small, only two assignments.

From-SVN: r80439
2004-04-05 22:46:04 +00:00
Paolo Carlini 9f35e4aab5 filebuf_sputn_unbuf.cc: New, adapted from libstdc++/11378.
2004-04-04  Paolo Carlini  <pcarlini@suse.de>
	    Petur Runolfsson  <peturr02@ru.is>

	* testsuite/performance/27_io/filebuf_sputn_unbuf.cc: New,
	adapted from libstdc++/11378.

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

From-SVN: r80398
2004-04-04 18:18:29 +00:00
Paolo Carlini c8333c0fd5 mt_allocator.h (__mt_alloc<>::allocate): Factor out some duplicated code.
2004-04-03  Paolo Carlini  <pcarlini@suse.de>

	* include/ext/mt_allocator.h (__mt_alloc<>::allocate): Factor out
	some duplicated code.
	(__mt_alloc<>::_Bin_record): Spare the space of _M_free and _M_used
	in the single threaded case.
	* testsuite/performance/20_util/allocator/list_sort_search.cc:
	Reorder and renumber the tests consistently with the other testfiles.
	* testsuite/performance/20_util/allocator/map_mt_find.cc: Ditto.
	* testsuite/performance/20_util/allocator/map_thread.cc: Ditto.
	* testsuite/performance/20_util/allocator/producer_consumer.cc: Ditto.

From-SVN: r80375
2004-04-03 13:39:16 +00:00
Paolo Carlini ab40b100d3 mt_allocator.h (__mt_alloc<>::deallocate): Rearrange arithmetic to avoid computing two divisions at each deallocation.
2004-04-02  Paolo Carlini  <pcarlini@suse.de>

	* include/ext/mt_allocator.h (__mt_alloc<>::deallocate):
	Rearrange arithmetic to avoid computing two divisions at
	each deallocation.

From-SVN: r80356
2004-04-02 19:51:21 +00:00
Paolo Carlini 354d4c68c6 mt_allocator.h (__mt_alloc<>::_S_initialize): Streamline the second half...
2004-04-01  Paolo Carlini  <pcarlini@suse.de>

	* include/ext/mt_allocator.h (__mt_alloc<>::_S_initialize):
	Streamline the second half, wrapping it in a single
	'#ifdef __GTHREADS if (__gthread_active_p())' and avoiding
	conditionals inside loops.

From-SVN: r80323
2004-04-01 21:47:59 +00:00
Paolo Carlini 2ae6e9823a re PR libstdc++/14775 ([3.4 only] LFS tests missing)
2004-04-01  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/14775
	* acconfig.h: Rename _GLIBCXX_MEM_LIMITS to _GLIBCXX_RES_LIMITS.
	* acinclude.m4 (GLIBCXX_CHECK_SETRLIMIT): Call
	GLIBCXX_CHECK_SETRLIMIT_ancilliary for FSIZE too, adjust define
	to _GLIBCXX_RES_LIMITS.
	(GLIBCXX_CHECK_SETRLIMIT_ancilliary): Rename HAVE_MEMLIMIT_* to
	HAVE_LIMIT_*.
	* testsuite/testsuite_hooks.h: Declare set_file_limit.
	* testsuite/testsuite_hooks.cc: Define it, using getrlimit
	and setrlimit(RLIMIT_FSIZE).
	* testsuite/27_io/fpos/14775.cc: New.
	* config.h.in: Regenerate.
	* configure: Likewise.

From-SVN: r80289
2004-04-01 09:16:36 +00:00
Paolo Carlini e004c3313e c_locale.cc (__convert_to_v(long double&)): In v3 uses of sscanf...
2004-03-31  Paolo Carlini  <pcarlini@suse.de>

	* config/locale/generic/c_locale.cc (__convert_to_v(long double&)):
	In v3 uses of sscanf, the special floating-point numbers INF,
	INFINITY, etc., cannot occur in input, therefore, if the latter
	is too large, ERANGE is always stored in errno, no need of finitel.

From-SVN: r80247
2004-03-31 09:13:10 +00:00
Benjamin Kosnik 06ce772609 re PR libstdc++/14783 (Warning in std::set constructor at bits/stl_tree.h:403)
2004-03-30  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/14783
	* include/bits/stl_tree.h: Adjust initialization list order.

From-SVN: r80095
2004-03-30 21:04:19 +00:00
Loren J. Rittle 7be1c3fba9 Update comment to reflect test.
From-SVN: r80067
2004-03-29 23:42:05 +00:00
Paolo Carlini 63041e68a4 pthread7-rope.cc: Fix...
2004-03-29  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/thread/pthread7-rope.cc: Fix, unpredictably, depending
	on allocator behavior, the memory pointed by data2 may well be not
	trashed.

From-SVN: r80051
2004-03-29 09:54:15 +00:00
Chavdar Botev f26e5597f0 re PR libstdc++/14245 ([3.4 only] problem with user-defined allocators in std::basic_string)
2004-03-28  Chavdar Botev  <cbotev@yahoo.com>

	PR libstdc++/14245
	* include/bits/basic_string.tcc
	(basic_string::basic_string(const basic_string&)): Pass to
	_Rep::_M_grab the actual allocator of the string being constructed
	not the default constructed one.

From-SVN: r80041
2004-03-28 16:27:27 +00:00
Benjamin Kosnik a5f105b590 [multiple changes]
2004-03-27  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++ PR/13598
	* config/locale/ieee_1003.1-2001/codecvt_specializations.h
	(__enc_traits::_M_destroy): New.
	(__enc_traits::~__enc_traits): Use it.
	(__enc_traits::operator=): Use _M_destroy, _M_init.
	(__enc_traits::__enc_traits): Same.

2004-03-27  Petur Runolfsson  <peturr02@ru.is>

	* testsuite/ext/enc_filebuf/char/13598.cc: New.

From-SVN: r80027
2004-03-27 16:21:21 +00:00
Paolo Carlini 6f52a889fd [multiple changes]
2004-03-27  Paolo Carlini  <pcarlini@suse.de>

	* include/ext/mt_allocator.h: Uglify consistently names of
	variables, members and classes; tidy.

2004-03-27  Dhruv Matani  <dhruvbird@gmx.net>

	* include/ext/mt_allocator.h (__mt_alloc<>::deallocate):
	Deallocation loop rewrote.

From-SVN: r80012
2004-03-27 10:15:49 +00:00
Paolo Carlini dd95381f8a mt_allocator.h (__mt_alloc<>::allocate, [...]): Protect two instances of block->thread_id with __GTHREADS.
2004-03-26  Paolo Carlini  <pcarlini@suse.de>

	* include/ext/mt_allocator.h (__mt_alloc<>::allocate,
	__mt_alloc<>::deallocate): Protect two instances of
	block->thread_id with __GTHREADS.

From-SVN: r79986
2004-03-26 16:56:09 +00:00
Benjamin Kosnik 8bd22a3ceb [multiple changes]
2004-03-25  Gawain Bolton  <gp.bolton@computer.org>

	* include/bits/stl_tree.h (_Rb_tree_impl): Add _Node_allocator
	default argument in constructors.
	(_Rb_tree::_M_empty_initialize): Remove.

2004-03-25  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/23_containers/map/operators/1_neg.cc: Adjust line numbers.
	* testsuite/23_containers/set/operators/1_neg.cc: Same.

2004-03-25  Dhruv Matani  <dhruvbird@gmx.net>

	* include/bits/cpp_type_traits.h: Changed __is_pod
	completely. Now, it does not use any of the previous type_traits
	to detect the pod types, and it also detects function pointers as
	POD types.

	* include/bits/stl_tree.h: Introduced a new class _Rb_tree_impl,
	which encapsulates the internal implementation of an rb_tree. Made
	the allocator a base class of this class instead of the rb_tree,
	which was not conforming. This _Rb_tree_impl class is also
	specialized on whether the _Compare parameter is a POD type or
	not. If so, then it maintains the comparison function as a data
	member, otherwise it makes the _Compare parameter a base class of
	itself. Also, _M_key_compare is now a function instead of a data
	member, so that the above trick can work properly. Delegated the
	initialization of the other data members to this newly created
	class. Also, now other member functions of rb_tree must refer to
	_M_key_compare as _M_impl._M_key_compare(). The other data members
	(*) can be referenced to as _M_impl.(*), where
	(*) includes _M_header, and _M_node_count.

From-SVN: r79977
2004-03-26 00:38:57 +00:00
Paolo Carlini 90ceccd46e mt_allocator.h (__mt_alloc<>::tune): Add _M_min_bin, the size in bytes of the smallest bin.
2004-03-25  Paolo Carlini  <pcarlini@suse.de>

	* include/ext/mt_allocator.h (__mt_alloc<>::tune):
	Add _M_min_bin, the size in bytes of the smallest bin.
	(__mt_alloc<>::tune()): Tweak accordingly.
	(__mt_alloc<>::tune(size_t, ...)): Likewise.
	(__mt_alloc<>::block_record): Change to a union: members next
	and thread_id are never used at the same time.
	(__mt_alloc<>::allocate): Update consistently.
	(__mt_alloc<>::deallocate): Likewise.
	(__mt_alloc<>::_S_initialize): Update setups of _S_binmap and
	_S_bin_size for the configurable _M_min_size.

From-SVN: r79962
2004-03-25 18:23:40 +00:00
Dhruv Matani 03f9ea4437 stl_list.h: Created a _List_impl class and made it derive from the allocator...
2004-03-25  Dhruv Matani  <dhruvbird@gmx.net>

	* include/bits/stl_list.h: Created a _List_impl class and made it
	derive from the allocator, instead of the list deriving from the
	allocator class, which was not conformant. Changed all references
	from this->_M_node to this->_M_impl._M_node * bits/list.tcc: Same
	as above (changed all references to the concerned variables).

2004-03-25  Dhruv Matani  <dhruvbird@gmx.net>

	* include/bits/stl_deque.h: Created a _Deque_impl class and made
	it derive from the allocator, instead of the deque deriving from
	the allocator class, which was not conformant. Changed all
	references to the _M_start, _M_finish, _M_map, and _M_map_size to
	_M_impl.*.
	(_Deque_base<_Tp,_Alloc>::~_Deque_base()): Added this->
	qualification in 2 places where it was missing.
	(_Deque_base<_Tp,_Alloc>::_M_initialize_map(size_t)): Same as
	above.
	* include/bits/deque.tcc: Same as above (changed all references to
	the concerned variables).

2004-03-25  Dhruv Matani  <dhruvbird@gmx.net>

	* include/bits/stl_vector.h: Created a _Vector_impl class and made
	it derive from the allocator, instead of the _Vector_base class,
	deriving from the allocator which was not conformant. Changed all
	references to the _M_start, _M_finish, and _M_end_of_storage to
	_M_impl.*.
	* include/bits/vector.tcc: Same as above (changed all references
	to the concerned variables).

2004-03-25  Dhruv Matani  <dhruvbird@gmx.net>

	* testsuite/23_containers/deque/cons/clear_allocator.cc: New.
	* testsuite/23_containers/list/cons/clear_allocator.cc: New.
	* testsuite/23_containers/vector/cons/clear_allocator.cc: New.

From-SVN: r79957
2004-03-25 17:12:16 +00:00
Dhruv Matani 58c959212f malloc_allocator.h: Fixed the construct function to call global placement new instead of assignment.
2004-03-24  Dhruv Matani  <dhruvbird@gmx.net>

	* ext/malloc_allocator.h: Fixed the construct function to call
	global placement new instead of assignment. Added a check after
	the return from malloc to check whether returned pointer is NULL,
	and if so, throw std::bad_alloc().
	* ext/debug_allocator.h: Added a check in the deallocate function
	to check whether the user has passed a NULL pointer or not.

From-SVN: r79934
2004-03-24 21:40:01 +00:00
Benjamin Kosnik 8367b9c1e9 allocator.html: Add bitmap_allocator links.
2004-03-24  Benjamin Kosnik  <bkoz@redhat.com>

	* docs/html/20_util/allocator.html: Add bitmap_allocator links.

From-SVN: r79933
2004-03-24 21:30:26 +00:00
Andreas Schwab d62c1a1f98 prune.exp (prune_gcc_output): Ignore errata warning from IA64 assembler.
gcc/testsuite/:
	* lib/prune.exp (prune_gcc_output): Ignore errata warning from
	IA64 assembler.

libstdc++-v3/:
	* testsuite/lib/prune.exp (prune_g++_output): Ignore errata
	warning from IA64 assembler.

From-SVN: r79929
2004-03-24 19:54:26 +00:00
Dhruv Matani 71f9a9d15e bitmap_allocator.h: (_Bit_scan_forward) -> Made this function call __builtin_ctz instead of the...
2004-03-24  Dhruv Matani  <dhruvbird@gmx.net>

	* include/ext/bitmap_allocator.h: (_Bit_scan_forward) -> Made this
	function call __builtin_ctz instead of the while loop.
	(allocate) -> If condition has __builtin_expect.
	(deallocate) -> Ditto.
	Renamed a few left-over variables and typedefs according to the
	C++STYLE mentioned in the documentation.
	Protected calls to __gthread* by __gthread_active_p(), whose value
	is cached in the local variable __threads_active.

From-SVN: r79924
2004-03-24 18:27:43 +00:00
Felix Yen b4a76c01db producer_consumer.cc: Use linear algorithm for producer.
2004-03-24  Felix Yen  <fwy@alumni.brown.edu>

	* testsuite/performance/20_util/allocator/producer_consumer.cc:
	Use linear algorithm for producer.

From-SVN: r79920
2004-03-24 17:16:07 +00:00
Paolo Carlini affb18b2fa mt_allocator.h (__mt_alloc<>::allocate, [...]): Avoid redundant conditionals.
2004-03-24  Paolo Carlini  <pcarlini@suse.de>

	* include/ext/mt_allocator.h (__mt_alloc<>::allocate,
	__mt_alloc<>::deallocate): Avoid redundant conditionals.

From-SVN: r79917
2004-03-24 15:25:37 +00:00
Benjamin Kosnik 586b5f2013 locale_facets.h: Tweaks for 80 column.
2004-03-23  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/locale_facets.h: Tweaks for 80 column.
	(__numpunct_cache::_M_cache): Move to locale_facets.tcc.
	(__moneypunct_cache::_M_cache): Same.
	(num_get): Don't inherit from __num_base.
	(num_put): Same.
	(money_get): Don't inherit from money_base.
	(money_put): Same.
	(__timepunct::_M_am_pm_format): New.
	(time_get::_M_extract_num): Return iterator, use ios_base as argument.
	(time_get::_M_extract_name): Same.
	(time_get::_M_extract_via_format): Same.
	* include/bits/locale_facets.tcc: Tweaks for 80 column.
	Use _M_getloc instead of getloc.
	* testsuite/22_locale/money_put/put/char/9780-3.cc: New.
	* testsuite/22_locale/num_put/put/char/9780-2.cc: New.
	* testsuite/22_locale/time_put/put/char/9780-1.cc: New.

From-SVN: r79902
2004-03-24 06:41:07 +00:00
Paolo Carlini 29d4adf460 acinclude.m4 (GLIBCXX_ENABLE_ALLOCATOR): Add pool_allocator.
2004-03-22  Paolo Carlini  <pcarlini@suse.de>

	* acinclude.m4 (GLIBCXX_ENABLE_ALLOCATOR): Add pool_allocator.
	* configure: Regenerate.
	* config/allocator/pool_allocator_base.h: New.
	* include/ext/pool_allocator.h: Convert to a standard-conforming
	allocator.
	* src/allocator.cc: Tweak instantiations.
	* testsuite/performance/20_util/allocator/insert.cc: Add __pool_alloc.
	* testsuite/performance/20_util/allocator/insert_insert.cc: Ditto.
	* testsuite/performance/20_util/allocator/list_sort_search.cc: Ditto.
	* testsuite/performance/20_util/allocator/map_mt_find.cc: Ditto.
	* testsuite/performance/20_util/allocator/map_thread.cc: Ditto.
	* testsuite/performance/20_util/allocator/producer_consumer.cc: Ditto.

From-SVN: r79824
2004-03-22 13:07:13 +00:00
Hans-Peter Nilsson fea41ef911 atomicity.h (__atomic_add): Remove "static inline" and attribute-unused.
* config/cpu/cris/atomicity.h (__atomic_add): Remove "static
	inline" and attribute-unused.  Qualify parameter __mem with
	"volatile".
	(__exchange_and_add): Ditto.  Add back memory clobber to asm.

From-SVN: r79804
2004-03-22 01:37:04 +00:00
Paolo Carlini 9c024d9c08 2.cc: Remove junk.
2004-03-20  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/27_io/basic_istream/extractors_arithmetic/char/2.cc:
	Remove junk.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/3.cc:
	Likewise.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/6.cc:
	Likewise.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/7.cc:
	Likewise.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/8.cc:
	Likewise.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/9.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/12.cc:
	Likewise.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/13.cc:
	Likewise.

From-SVN: r79742
2004-03-20 12:54:35 +00:00
Paolo Carlini 2787b59a7f std_valarray.h: Document DR389 [Ready].
2004-03-20  Paolo Carlini  <pcarlini@suse.de>

	* include/std/std_valarray.h: Document DR389 [Ready].
	* docs/html/ext/howto.html: Add an entry for DR389.

From-SVN: r79733
2004-03-20 10:05:48 +00:00
Michael Eager 1b1a632b4d atomicity.h: Prevent reg loads between LL and SC instructions.
2004-03-19  Michael Eager  <eager@mvista.com>

	* config/cpu/mips/atomicity.h:  Prevent reg loads between LL and
	SC instructions.

From-SVN: r79711
2004-03-19 23:12:10 +00:00
Paolo Carlini 28f2a26519 11.cc: Remove redundant static_cast-s.
2004-03-19  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/22_locale/num_get/get/char/11.cc: Remove redundant
	static_cast-s.
	* testsuite/22_locale/num_get/get/char/12.cc: Likewise.
	* testsuite/22_locale/num_get/get/char/13.cc: Likewise.
	* testsuite/22_locale/num_get/get/char/14.cc: Likewise.
	* testsuite/22_locale/num_get/get/char/15.cc: Likewise.
	* testsuite/22_locale/num_get/get/wchar_t/11.cc: Likewise.
	* testsuite/22_locale/num_get/get/wchar_t/12.cc: Likewise.
	* testsuite/22_locale/num_get/get/wchar_t/13.cc: Likewise.
	* testsuite/22_locale/num_get/get/wchar_t/14.cc: Likewise.
	* testsuite/22_locale/num_get/get/wchar_t/15.cc: Likewise.

From-SVN: r79698
2004-03-19 20:07:55 +00:00
Paolo Carlini 8268bba6f8 re PR libstdc++/12077 ([3.4 only] wcin.rdbuf()->in_avail() return value too high)
2004-03-19  Paolo Carlini  <pcarlini@suse.de>
	    Petur Runolfsson  <peturr02@ru.is>

	PR libstdc++/12077
	* include/ext/stdio_sync_filebuf.h (showmanyc): Remove, there's
	no way to find out the conversion used by the underlying FILE*.
	* testsuite/ext/stdio_sync_filebuf/wchar_t/12077.cc: New.
	* testsuite/27_io/objects/char/9.cc: Tweak.

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

From-SVN: r79695
2004-03-19 19:31:38 +00:00
Paolo Carlini 59d3567214 re PR libstdc++/14648 (rope is broken (regression))
2004-03-19  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/14648
	* include/ext/ropeimpl.h (rope<>::_S_apply_to_pieces): Fix
	memory allocation/deallocation calls.
	* testsuite/ext/14648.cc: New.

From-SVN: r79687
2004-03-19 16:08:15 +00:00
Peter Schmid ab7ac2227a re PR libstdc++/14647 (bit_vectors are broken (regression))
2004-03-19  Peter Schmid  <schmid@snake.iap.physik.tu-darmstadt.de>

        PR libstdc++/14647
        * include/backward/bvector.h (bit_vector): Allocator is in std
        namespace.

From-SVN: r79685
2004-03-19 06:54:40 -08:00
Phil Edwards d54bc1d870 acinclude.m4 (GLIBCXX_CHECK_WCHAR_T_SUPPORT): Set LIBICONV, not libiconv.
2004-03-19  Phil Edwards  <phil@codesourcery.com>

	* acinclude.m4 (GLIBCXX_CHECK_WCHAR_T_SUPPORT):  Set LIBICONV,
	not libiconv.  SUBST this variable as well.
	* testsuite/Makefile.am (site.exp):  New target, based on that
	created by automake.  Also set libiconv.

	* configure, Makefile.in, include/Makefile.in, libmath/Makefile.in,
	libsupc++/Makefile.in, po/Makefile.in, src/Makefile.in,
	testsuite/Makefile.in:  Regenerate.

From-SVN: r79678
2004-03-19 11:34:47 +00:00
Benjamin Kosnik 87599abdc5 acinclude.m4 (GLIBCXX_ENABLE_ALLOCATOR): Default setting is new_allocator for all hosts.
2004-03-16  Benjamin Kosnik  <bkoz@redhat.com>

	* acinclude.m4 (GLIBCXX_ENABLE_ALLOCATOR): Default setting is
	new_allocator for all hosts.
	* configure: Regenerate.

From-SVN: r79582
2004-03-17 08:50:32 +00:00
Paolo Carlini e20036e26c 4.cc: Fix for 64-bit pointers.
2004-03-16  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/22_locale/num_put/put/char/4.cc: Fix for 64-bit pointers.
	* testsuite/22_locale/num_put/put/wchar_t/4.cc: Likewise.

From-SVN: r79580
2004-03-17 08:22:38 +00:00
Paolo Carlini 33674f003a locale_facets.tcc (money_get<>::_M_extract): Adjust the logic underlying the parsing of symbol to deal correctly with an...
2004-03-15  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (money_get<>::_M_extract):
	Adjust the logic underlying the parsing of symbol to deal
	correctly with an optional sign component (i.e., when either
	negative_sign or positive_sign is empty)
	* testsuite/22_locale/money_get/get/char/19.cc: New.
	* testsuite/22_locale/money_get/get/wchar_t/19.cc: New.

2004-03-15  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (money_get<>::_M_extract):
	Do not accept an incomplete currency symbol.
	* testsuite/22_locale/money_get/get/char/18.cc: New.
	* testsuite/22_locale/money_get/get/wchar_t/18.cc: New.

From-SVN: r79491
2004-03-15 09:02:30 +00:00
Benjamin Kosnik 8b0d605196 allocator: New.
2004-03-13  Benjamin Kosnik  <bkoz@redhat.com>

	* config/allocator: New.
	* config/allocator/bitmap_allocator_base.h: New.
	* config/allocator/malloc_allocator_base.h: New.
	* config/allocator/mt_allocator_base.h: New.
	* config/allocator/new_allocator_base.h: New.
	* include/bits/allocator.h: Include c++allocator.h.
	* acinclude.m4 (GLIBCXX_ENABLE_ALLOCATOR): New.
	* aclocal.m4: Regenerate.
	* configure.ac: Use GLIBCXX_ENABLE_ALLOCATOR.
	* configure: Regenerate.
	* include/Makefile.am (host_headers_extra): Add c++allocator.h.
	* include/Makefile.in: Regenerate.
	* docs/html/configopts.html: Add enable-libstdcxx-allocator.

From-SVN: r79435
2004-03-13 06:54:25 +00:00
Benjamin Kosnik eef56029ed allocator.h: Revert.
2004-03-12  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/allocator.h: Revert.

From-SVN: r79413
2004-03-12 23:52:08 +00:00
Paolo Carlini d4cd08dda5 howto.html: Add entry for DR 253 [Ready].
2004-03-12  Paolo Carlini  <pcarlini@suse.de>

	* docs/html/ext/howto.html: Add entry for DR 253 [Ready].
	* include/bits/gslice_array.h: Add comment about DR 253.
	* include/bits/indirect_array.h: Likewise.
	* include/bits/mask_array.h: Likewise.
	* include/bits/slice_array.h: Likewise.

From-SVN: r79412
2004-03-12 23:32:03 +00:00
Benjamin Kosnik ce7df2fd97 14176.cc: New.
2004-03-12  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/20_util/allocator/14176.cc: New.
	* include/ext/mt_allocator.h: Formatting fixes.

From-SVN: r79407
2004-03-12 21:11:51 +00:00
Paolo Carlini e362800142 2004-03-12 Paolo Carlini <pcarlini@suse.de>
* Fix address in Steven's Changelog entry.

From-SVN: r79381
2004-03-12 12:19:28 +00:00
Dhruv Matani 009368dba6 ballocator_doc.txt: New file.
2004-03-11  Dhruv Matani  <dhruvbird@HotPOP.com>

	* docs/html/ext/ballocator_doc.txt: New file.
	* include/Makefile.am (ext_headers): Add
	${ext_srcdir}/bitmap_allocator.h .
	* include/Makefile.in: Regenerate (by hand, since I didn't have
	automake de jure on hand).
	* include/ext/bitmap_allocator.h: New file.
	* testsuite/performance/20_util/allocator/list_sort_search.cc: New test.
	* testsuite/performance/20_util/allocator/map_mt_find.cc: Likewise.
	* testsuite/performance/20_util/allocator/producer_consumer.cc: Add
	test for the bitmap_allocator<>.
	* testsuite/performance/20_util/allocator/insert.cc: Likewise.
	* testsuite/performance/20_util/allocator/insert_insert.cc: Likewise.
	* testsuite/performance/20_util/allocator/map_thread.cc: Likewise.

From-SVN: r79366
2004-03-12 03:28:12 +00:00
Paolo Carlini c6feb69790 std_complex.h (pow(const complex&, const _Tp&), [...]): Fully qualify with std:: a few calls.
2004-03-11  Paolo Carlini  <pcarlini@suse.de>

	* include/std/std_complex.h (pow(const complex&, const _Tp&),
	pow(const _Tp&, const complex&), pow(const complex&,
	const complex&)): Fully qualify with std:: a few calls.
	* testsuite/26_numerics/complex/13450.cc: Minor tweak.

From-SVN: r79338
2004-03-11 19:05:19 +00:00
Steven Bosscher b7c34954fe re PR libstdc++/11706 (std::pow(T, int) implementation pessimizes code)
2004-03-11  Steven Bosscher  <s.bosscher@student.tudelft.nl>

	PR libstdc++/11706
	* include/c_std/cmath.tcc (__cmath_power): Define inline.

From-SVN: r79316
2004-03-11 10:42:26 +00:00
Kelley Cook 8ab705be38 configure.ac: Bump AC_PREREQ to 2.59.
boehm-gc/
2004-03-10  Kelley Cook  <kcook@gcc.gnu.org>

	* configure.ac: Bump AC_PREREQ to 2.59.
	* configure: Regenerate.
	* config.in: Regenerate.

fastjar/
2004-03-10  Kelley Cook  <kcook@gcc.gnu.org>

	* configure.ac: Bump AC_PREREQ to 2.59.
	* configure: Regenerate.

intl/
2004-03-10  Kelley Cook  <kcook@gcc.gnu.org>

	* configure.ac: Bump AC_PREREQ to 2.59.
	* configure: Regenerate.
	* config.h.in: Regenerate.

gcc/
2004-03-10  Kelley Cook  <kcook@gcc.gnu.org>

	* configure.ac: Bump AC_PREREQ to 2.59.
	* configure: Regenerate.

libada/
2004-03-10  Kelley Cook  <kcook@gcc.gnu.org>

	* configure.in: Rename file to ...
	* configure.ac: .. to this. Bump AC_PREREQ to 2.59.
	* configure: Regenerate.

libjava/libltdl/
2004-03-10  Kelley Cook  <kcook@gcc.gnu.org>

	* configure.ac: Bump AC_PREREQ to 2.59.
	* configure: Regenerate.
	* config-h.in: Regenerate.

libstdc++-v3/
2004-03-10  Kelley Cook  <kcook@gcc.gnu.org>

	* configure.ac: Bump AC_PREREQ to 2.59.

contrib/
2004-03-10  Kelley Cook  <kcook@gcc.gnu.org>

	* gcc_update (files_and_dependencies): Insert libada/configure.

From-SVN: r79285
2004-03-11 00:27:41 +00:00
Paolo Carlini f69535d2b7 valarray_subset_assignment.cc: Fix typos.
2004-03-10  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/26_numerics/valarray_subset_assignment.cc: Fix typos.

From-SVN: r79253
2004-03-10 13:40:17 +00:00
Paul Kienzle 52ddaf41bf re PR libstdc++/13450 (std::pow(std::complex<double>(-1.,0.),0.5) yields (NaN,0))
2004-03-10  Paul Kienzle  <pkienzle@nist.gov>
	    Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/13450
	* include/std/std_complex.h (pow(const complex&, const _Tp&),
	pow(const _Tp&, const complex&)): Use cmath pow only when safe.
	* testsuite/26_numerics/complex/13450.cc: New.

	* testsuite/26_numerics/cmath/overloads.C: Rename to overloads.cc.
	* testsuite/26_numerics/complex/pow.C: Rename to pow.cc and fix.

From-SVN: r79227
2004-03-10 09:16:12 +00:00
Jerry Quinn ecc7568da6 re PR libstdc++/3247 (valarray private member)
2004-03-10  Jerry Quinn  <jlquinn@optonline.net>

	PR 3247
	* include/bits/gslice_array.h (gslice_array()): Make public.
	(operator=(gslice_array)): Make public.  Implement.
	* include/bits/indirect_array.h (indirect_array()): Make public.
	* include/bits/mask_array.h (mask_array()): Make public.
	(operator=(mask_array)): Make public.  Implement.
	* include/bits/valarray_array.tcc (__valarray_copy):
	Comment.  Add versions for gslice_array and mask_array.
	* testsuite/26_numerics/valarray_subset_assignment.cc:  New test.

From-SVN: r79226
2004-03-10 06:50:13 +00:00
Benjamin Kosnik 6dde938c11 swap.cc: Add in bits for non-weak systems.
2004-03-09  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/23_containers/deque/modifiers/swap.cc: Add in bits for
	non-weak systems.
	* testsuite/23_containers/vector/modifiers/swap.cc: Same.
	* testsuite/23_containers/set/modifiers/swap.cc: Same.
	* testsuite/23_containers/multiset/modifiers/swap.cc: Same.
	* testsuite/23_containers/multimap/modifiers/swap.cc: Same.
	* testsuite/23_containers/map/modifiers/swap.cc: Same.
	* testsuite/23_containers/list/modifiers/swap.cc: Same.

	* testsuite/22_locale/locale/cons/12658_thread.cc: Catch exceptions.

From-SVN: r79224
2004-03-10 06:31:50 +00:00
Benjamin Kosnik f1c4ca32d0 re PR c++/13658 ([testcase] namespace association vs. templates part one)
2004-03-08  Benjamin Kosnik  <bkoz@redhat.com>

	PR c++/13658
	* testsuite/23_containers/deque/modifiers/swap.cc: New.
	* testsuite/23_containers/list/modifiers/swap.cc: New.
	* testsuite/23_containers/map/modifiers/swap.cc: New.
	* testsuite/23_containers/multimap/modifiers/swap.cc: New.
	* testsuite/23_containers/multiset/modifiers/swap.cc: New.
	* testsuite/23_containers/set/modifiers/swap.cc: New.
	* testsuite/23_containers/vector/modifiers/swap.cc: New.

From-SVN: r79151
2004-03-09 06:01:39 +00:00
Petur Runolfsson 5a66cfb2f1 re PR libstdc++/12658 (Thread safety problems in locale::global() and locale::locale())
2004-03-08  Petur Runolfsson  <peturr02@ru.is>

	PR libstdc++/12658
	* testsuite/22_locale/locale/cons/12658_thread.cc: New.

From-SVN: r79128
2004-03-08 22:11:47 +00:00
Paolo Carlini 1d4eb925b9 howto.html: Add entry for DR 103 [WP].
2004-03-08  Paolo Carlini  <pcarlini@suse.de>

	* docs/html/ext/howto.html: Add entry for DR 103 [WP].
	* include/bits/stl_multiset.h: Add comment about DR 103.
	* include/bits/stl_set.h: Likewise.

From-SVN: r79114
2004-03-08 15:04:11 +00:00
Paolo Carlini f1c89270e5 locale_facets.tcc (money_get<>::_M_extract): The value _space_ indicates that at least one space is required at that position.
2004-03-08  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (money_get<>::_M_extract):
	The value _space_ indicates that at least one space is required
	at that position.
	* testsuite/22_locale/money_get/get/char/17.cc: New.
	* testsuite/22_locale/money_get/get/wchar_t/17.cc: New.

	* testsuite/22_locale/money_get/get/char/7.cc: Minor tweaks.
	* testsuite/22_locale/money_get/get/wchar_t/7.cc: Likewise.

	* include/bits/locale_facets.tcc (money_get<>::do_get(long_double&)):
	Remove redundant conditional on __str.size().

From-SVN: r79111
2004-03-08 10:51:30 +00:00
Benjamin Kosnik f5fb3886b2 allocator.h: Switch defaults to mt_alloc.
2004-03-08  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/allocator.h: Switch defaults to mt_alloc.

From-SVN: r79084
2004-03-08 00:27:37 +00:00
Benjamin Kosnik c0bec71b82 mt_allocator.h (_S_initialize): If !__GTHREAD_MUTEX_INIT, then initialize _S_thread_freelist_mutex.
2004-03-06  Benjamin Kosnik  <bkoz@redhat.com>

	* include/ext/mt_allocator.h (_S_initialize): If
	!__GTHREAD_MUTEX_INIT, then initialize _S_thread_freelist_mutex.

From-SVN: r79044
2004-03-07 02:17:19 +00:00
Benjamin Kosnik f83295bafc re PR libstdc++/12658 (Thread safety problems in locale::global() and locale::locale())
2004-03-06  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/12658
	* src/locale_init.cc (locale::locale): Lock critical regions with
	external mutexes.
	(locale::global): Same.
	* include/bits/concurrence.h (__glibcxx_mutex_define_initialized):
	Add in once bits for cases without __GTHREAD_MUTEX_INIT.
	(__glibcxx_mutex_lock): Same.

	* config/cpu/generic/atomicity.h: Remove
	_GLIBCXX_NEED_GENERIC_MUTEX, use concurrence.h.
	* src/misc-inst.cc: Move all locking bits out of this file.

	* config/os/hpux/os_defines.h: Remove _GLIBCXX_INST_ATOMICITY_LOCK.
	* src/misc-inst.cc: Same.
	* config/cpu/hppa/atomicity.h: Same.

	* config/linker-map.gnu: Remove types in the signature of atomic
	exports, as they may vary.

From-SVN: r79043
2004-03-07 01:32:43 +00:00
Paolo Carlini 0c2cc7b37a locale_facets.tcc: Tweak the comment preceding has_facet: doesn't throw.
2004-03-06  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc: Tweak the comment preceding
	has_facet: doesn't throw.

From-SVN: r79022
2004-03-06 16:55:28 +00:00
Paolo Carlini 73da19bbb6 1.cc: Clean up.
2004-03-06  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/22_locale/money_get/get/char/1.cc: Clean up.
	* testsuite/22_locale/money_get/get/char/2.cc: Likewise.
	* testsuite/22_locale/money_get/get/char/3.cc: Likewise.
	* testsuite/22_locale/money_get/get/char/4.cc: Likewise.
	* testsuite/22_locale/money_get/get/wchar_t/1.cc: Likewise.
	* testsuite/22_locale/money_get/get/wchar_t/2.cc: Likewise.
	* testsuite/22_locale/money_get/get/wchar_t/3.cc: Likewise.
	* testsuite/22_locale/money_get/get/wchar_t/4.cc: Likewise.

From-SVN: r79019
2004-03-06 14:56:56 +00:00
Paolo Carlini ce3455909f locale_facets.tcc (num_get<>::_M_extract_float, [...]): Prefer plain operator== to traits::eq().
2004-03-06  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (num_get<>::_M_extract_float,
	num_get<>::_M_extract_int, num_get<>::do_get(bool&),
	__pad<>::_S_pad): Prefer plain operator== to traits::eq().
	* testsuite/testsuite_character.h (struct __gnu_test::character):
	Provide operator==.
	* testsuite/testsuite_hooks.h (struct __gnu_test::pod_char):
	Likewise.

From-SVN: r79011
2004-03-06 09:00:14 +00:00
Paolo Carlini 35bd3c283e 14320-2.cc: Remove xfail.
2004-03-05  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/27_io/fpos/14320-2.cc: Remove xfail.

From-SVN: r78963
2004-03-05 10:51:27 +00:00
Benjamin Kosnik 80e39f4ae5 1.cc: Test result string.
2004-03-04  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/23_containers/multiset/insert/1.cc: Test result string.

	* testsuite/23_containers/bitset/invalidation/1.cc: Main always
	returns 0.
	* testsuite/23_containers/deque/invalidation/4.cc: Same.
	* testsuite/23_containers/list/invalidation/1.cc: Same.
	* testsuite/23_containers/list/invalidation/2.cc: Same.
	* testsuite/23_containers/list/invalidation/3.cc: Same.
	* testsuite/23_containers/list/invalidation/4.cc: Same.
	* testsuite/23_containers/map/invalidation/2.cc: Same.
	* testsuite/23_containers/multimap/invalidation/1.cc: Same.
	* testsuite/23_containers/multimap/invalidation/2.cc: Same.
	* testsuite/23_containers/multiset/invalidation/1.cc: Same.
	* testsuite/23_containers/multiset/invalidation/2.cc: Same.
	* testsuite/23_containers/set/invalidation/1.cc: Same.
	* testsuite/23_containers/set/invalidation/2.cc: Same.
	* 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.

From-SVN: r78943
2004-03-04 23:37:24 +00:00
Paolo Carlini 2aa89cbb78 testsuite_flags.in: Add "-D_GLIBCXX_ASSERT" to CXXFLAGS_save.
2004-03-04  Paolo Carlini  <pcarlini@suse.de>

	* scripts/testsuite_flags.in: Add "-D_GLIBCXX_ASSERT" to
	CXXFLAGS_save.
	* testsuite/lib/libstdc++.exp: Don't add it conditionally to
	DEFAULT_CXXFLAGS.
	* testsuite/18_support/numeric_limits.cc: Remove "-D_GLIBCXX_ASSERT"
	from the dg-options.
	* testsuite/23_containers/vector/invalidation/1.cc: Likewise.
	* testsuite/23_containers/vector/invalidation/2.cc: Likewise.
	* testsuite/23_containers/vector/invalidation/3.cc: Likewise.
	* testsuite/23_containers/vector/invalidation/4.cc: Likewise.
	* testsuite/23_containers/vector/resize/1.cc: Likewise.
	* testsuite/26_numerics/complex_value.cc: Likewise.
	* testsuite/27_io/ios_base/storage/1.cc: Likewise.
	* testsuite/27_io/ios_base/storage/2.cc: Likewise.
	* testsuite/27_io/ios_base/storage/3.cc: Likewise.
	* testsuite/27_io/manipulators/standard/char/2.cc: Likewise.
	* testsuite/27_io/objects/char/5.cc: Likewise.
	* testsuite/27_io/objects/wchar_t/5.cc: Likewise.
	* testsuite/backward/11460.cc: Likewise.
	* testsuite/thread/pthread7-rope.cc: Likewise.

	* testsuite/21_strings/basic_string/compare/char/1.cc: Add
	missing test variable.
	* testsuite/21_strings/basic_string/compare/wchar_t/1.cc: Add
	missing test variable.

From-SVN: r78942
2004-03-04 23:29:44 +00:00
Benjamin Kosnik f90e600a4e 1.cc: Provide explicit instantiations for non-weak systems.
2004-03-04  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/20_util/allocator/1.cc: Provide explicit
	instantiations for non-weak systems.
	* testsuite/20_util/binders.cc: Same.
	* testsuite/20_util/allocator/8230.cc: Same.
	* testsuite/20_util/allocator/10378.cc: Same.
	* testsuite/22_locale/ctype/is/wchar_t/2.cc: Same.
	* testsuite/22_locale/ctype/is/char/2.cc: Same.
	* testsuite/thread/pthread7-rope.cc: Same.
	* testsuite/thread/pthread6.cc: Same.
	* testsuite/thread/pthread5.cc: Same.
	* testsuite/thread/pthread4.cc: Same.
	* testsuite/thread/pthread1.cc: Same.
	* testsuite/ext/rope.cc: Same.
	* testsuite/ext/hash_set.cc: Same.
	* testsuite/ext/hash_map.cc: Same.
	* testsuite/ext/concept_checks.cc: Same.
	* testsuite/27_io/basic_filebuf/seekpos/wchar_t/9874.cc: Same.
	* testsuite/25_algorithms/unique/2.cc: Same.
	* testsuite/25_algorithms/unique/1.cc: Same.
	* testsuite/25_algorithms/rotate.cc: Same.
	* testsuite/25_algorithms/min_max.cc: Same.
	* testsuite/25_algorithms/equal.cc: Same.
	* testsuite/24_iterators/rel_ops.cc: Same.
	* testsuite/24_iterators/iterator.cc: Same.
	* testsuite/24_iterators/insert_iterator.cc: Same.
	* testsuite/24_iterators/front_insert_iterator.cc: Same.
	* testsuite/24_iterators/back_insert_iterator.cc: Same.
	* testsuite/23_containers/vector/resize/1.cc: Same.
	* testsuite/23_containers/vector/modifiers/2.cc: Same.
	* testsuite/23_containers/vector/modifiers/1.cc: Same.
	* testsuite/23_containers/vector/invalidation/4.cc: Same.
	* testsuite/23_containers/vector/invalidation/3.cc: Same.
	* testsuite/23_containers/vector/invalidation/2.cc: Same.
	* testsuite/23_containers/vector/invalidation/1.cc: Same.
	* testsuite/23_containers/vector/element_access/1.cc: Same.
	* testsuite/23_containers/vector/cons/6513.cc: Same.
	* testsuite/23_containers/vector/cons/3.cc: Same.
	* testsuite/23_containers/vector/cons/2.cc: Same.
	* testsuite/23_containers/vector/cons/1.cc: Same.
	* testsuite/23_containers/vector/capacity/8230.cc: Same.
	* testsuite/23_containers/vector/capacity/1.cc: Same.
	* testsuite/23_containers/vector/bool/6886.cc: Same.
	* testsuite/23_containers/stack/members/7158.cc: Same.
	* testsuite/23_containers/set/invalidation/2.cc: Same.
	* testsuite/23_containers/set/invalidation/1.cc: Same.
	* testsuite/23_containers/queue/members/7157.cc: Same.
	* testsuite/23_containers/priority_queue/members/7161.cc: Same.
	* testsuite/23_containers/multiset/invalidation/2.cc: Same.
	* testsuite/23_containers/multiset/invalidation/2.cc: Same.
	* testsuite/23_containers/multiset/insert/1.cc: Same.
	* testsuite/23_containers/multimap/invalidation/2.cc: Same.
	* testsuite/23_containers/multimap/invalidation/2.cc: Same.
	* testsuite/23_containers/map/operators/1.cc: Same.
	* testsuite/23_containers/map/invalidation/2.cc: Same.
	* testsuite/23_containers/map/invalidation/1.cc: Same.
	* testsuite/23_containers/map/insert/1.cc: Same.
	* testsuite/23_containers/list/operators/4.cc: Same.
	* testsuite/23_containers/list/operators/3.cc: Same.
	* testsuite/23_containers/list/operators/2.cc: Same.
	* testsuite/23_containers/list/operators/1.cc: Same.
	* testsuite/23_containers/list/modifiers/3.cc: Same.
	* testsuite/23_containers/list/modifiers/2.cc: Same.
	* testsuite/23_containers/list/modifiers/1.cc: Same.
	* testsuite/23_containers/list/invalidation/4.cc: Same.
	* testsuite/23_containers/list/invalidation/3.cc: Same.
	* testsuite/23_containers/list/invalidation/2.cc: Same.
	* testsuite/23_containers/list/invalidation/1.cc: Same.
	* testsuite/23_containers/list/cons/9.cc: Same.
	* testsuite/23_containers/list/cons/8.cc: Same.
	* testsuite/23_containers/list/cons/7.cc: Same.
	* testsuite/23_containers/list/cons/6.cc: Same.
	* testsuite/23_containers/list/cons/5.cc: Same.
	* testsuite/23_containers/list/cons/4.cc: Same.
	* testsuite/23_containers/list/cons/3.cc: Same.
	* testsuite/23_containers/list/cons/2.cc: Same.
	* testsuite/23_containers/list/cons/1.cc: Same.
	* testsuite/23_containers/list/capacity/1.cc: Same.
	* testsuite/23_containers/deque/operators/1.cc: Same.
	* testsuite/23_containers/deque/invalidation/4.cc: Same.
	* testsuite/23_containers/deque/invalidation/3.cc: Same.
	* testsuite/23_containers/deque/invalidation/2.cc: Same.
	* testsuite/23_containers/deque/invalidation/1.cc: Same.
	* testsuite/23_containers/deque/cons/2.cc: Same.
	* testsuite/23_containers/deque/cons/1.cc: Same.

	* src/allocator.cc: Add char, wchar_t instantiations
	to match extern template declarations in memory.h.

From-SVN: r78922
2004-03-04 18:11:08 +00:00
Paolo Carlini ced3ad4d7c locale_facets.tcc (money_put<>::_M_insert): Fix warning regression.
2004-03-03  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (money_put<>::_M_insert):
	Fix warning regression.

From-SVN: r78861
2004-03-03 20:51:22 +00:00
Paolo Carlini 039e3c5c45 locale_facets.tcc (money_put<>::_M_insert): Deal properly with empty __digits and negative frac_digits, clean-up a bit.
2004-03-03  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (money_put<>::_M_insert):
	Deal properly with empty __digits and negative frac_digits,
	clean-up a bit.

From-SVN: r78844
2004-03-03 18:07:23 +00:00
Jonathan Wakely 0d957d2614 documentation.html: Regenerate.
2004-03-03  Jonathan Wakely  <redi@gcc.gnu.org>

	* docs/html/documentation.html: Regenerate.

From-SVN: r78838
2004-03-03 15:52:54 +00:00
Paolo Carlini 0b1d67d23b re PR libstdc++/14320 (istreambuf_iterator::difference_type is not a signed integral type)
2004-03-02  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/14320
	* include/bits/postypes.h (class streamoff): Remove, now
	streamoff is just typedef a 64 bit signed integer type.
	(class fpos): Tweak consistently.
	* testsuite/27_io/fpos/14320-1.cc: New.
	* testsuite/27_io/fpos/14320-2.cc: New.
	* testsuite/27_io/fpos/14320-3.cc: New.
	* testsuite/27_io/fpos/14320-4.cc: New.
	* testsuite/27_io/fpos/14320-5.cc: New.
	* testsuite/27_io/fpos/mbstate_t/4_neg.cc: xfail for now.

From-SVN: r78799
2004-03-03 00:22:05 +00:00
Paolo Carlini 59564c5e9a locale_facets.tcc (money_get<>::_M_extract): Reorganize a bit the main parsing loop...
2004-03-02  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (money_get<>::_M_extract):
	Reorganize a bit the main parsing loop, thus early detecting
	an empty value component.
	* testsuite/22_locale/money_get/get/char/16.cc: New.
	* testsuite/22_locale/money_get/get/wchar_t/16.cc: New.

From-SVN: r78788
2004-03-02 22:25:51 +00:00
Benjamin Kosnik ec2075e962 Support automake 1.8.2
2004-03-02  Benjamin Kosnik  <bkoz@redhat.com>

	Support automake 1.8.2
	* configure.ac (AM_INIT_AUTOMAKE): Add -Wno-override.
	* po/Makefile.am (EXTRA_DIST): New.
	* po/Makefile.in: Regenerate.
	* Makefile.in: Same.
	* include/Makefile.in: Same.
	* libmath/Makefile.in: Same.
	* libsupc++/Makefile.in: Same.
	* src/Makefile.in: Same.
	* testsuite/Makefile.in: Same.

	* include/Makefile.am (${host_builddir}/gthr-posix.h): Use
	__GXX_WEAK__ instead of SUPPORTS_WEAK.
	(${host_builddir}/gthr-default.h): Same.
	(${host_builddir}/gthr.h): Same.
	* acinclude.m4 (GLIBCXX_ENABLE_THREAD): Remove
	_GLIBCXX_SUPPORTS_WEAK, as this behavior can be modified via
	-fno-weak.
	* aclocal.m4: Regenerate.
	* acconfig.h: Remove _GLIBCXX_SUPPORTS_WEAK.
	* config.h.in: Regenerate.
	* configure: Same.

From-SVN: r78770
2004-03-02 18:30:08 +00:00
Benjamin Kosnik f214923cca acinclude.m4: Quote correctly.
2004-03-01  Benjamin Kosnik  <bkoz@redhat.com>

	* acinclude.m4: Quote correctly.
	* aclocal.m4: Regenerate.
	* linkage.m4: Same.

From-SVN: r78715
2004-03-01 19:22:28 +00:00
Benjamin Kosnik 6728336267 test.html: Add multilib RUNTESTFLAGS example.
2004-03-01  Benjamin Kosnik  <bkoz@redhat.com>

	* docs/html/test.html: Add multilib RUNTESTFLAGS example.

	* docs/html/18_support/howto.html: Add bit about writing to
	stderr, mostly by Zack.

From-SVN: r78709
2004-03-01 17:42:01 +00:00
Paolo Carlini 98e953f57b locale_facets.tcc (money_get<>::_M_extract, [...]): ...
2004-03-01  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (money_get<>::_M_extract,
	money_get<>::do_get(string_type&)): ... and two more.

From-SVN: r78708
2004-03-01 17:29:27 +00:00
Paolo Carlini b19fb27d1e locale_facets.tcc (money_get<>::_M_extract): Fix thinkos in the switch from string_type& to string& as last argument.
2004-03-01  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (money_get<>::_M_extract):
	Fix thinkos in the switch from string_type& to string& as last
	argument.

From-SVN: r78707
2004-03-01 17:08:45 +00:00
Paolo Carlini 08ff96c346 locale_facets.tcc (num_get<>::_M_extract_float): Also when parsing exponent sign, first look for thousands_sep and decimal_point...
2004-03-01  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (num_get<>::_M_extract_float):
	Also when parsing exponent sign, first look for thousands_sep
	and decimal_point; tweak a bit.
	* testsuite/22_locale/num_get/get/char/15.cc: New.
	* testsuite/22_locale/num_get/get/wchar_t/15.cc: New.

	* include/bits/locale_facets.tcc (num_get<>::_M_extract_float,
	num_get<>::_M_extract_int): Reorder some conditionals.

2004-03-01  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (money_get<>::_M_extract):
	Consistently with numpunct, enforce the requirements in
	22.2.6.3, p3 for the thousands separators; tweak a bit.
	* testsuite/22_locale/money_get/get/char/15.cc: New.
	* testsuite/22_locale/money_get/get/wchar_t/15.cc: New.

From-SVN: r78699
2004-03-01 10:31:33 +00:00
David Billinghurst 1152b861f7 libstdc++.exp (v3-list-tests): Use testsuite_files from correct multilib blddir when running testsuite.
2004-03-01  David Billinghurst <David.Billinghurst@riotinto.com>

	* testsuite/lib/libstdc++.exp (v3-list-tests): Use
	testsuite_files from correct multilib blddir when running
	testsuite.

From-SVN: r78692
2004-03-01 04:30:49 +00:00
Phil Edwards 8b42508262 Makefile.am (check-abi, [...]): Copy the summary file to the logfile.
2004-02-29  Phil Edwards  <phil@codesourcery.com>

	* testsuite/Makefile.am (check-abi, check-abi-verbose):  Copy
	the summary file to the logfile.
	* testsuite/Makefile.in:  Regenerate.

From-SVN: r78647
2004-02-29 12:57:33 +00:00
John David Anglin 3a1a4ed26e atomicity.h (__atomic_add): Make first argument volatile.
* config/cpu/hppa/atomicity.h (__atomic_add): Make first argument
	volatile.
	* config/os/hpux/os_defines.h (_GLIBCXX_INST_ATOMICITY_LOCK): Use
	__GXX_WEAK__ instead of _GLIBCXX_SUPPORTS_WEAK.

From-SVN: r78633
2004-02-28 22:46:32 +00:00
Paolo Carlini 0e1b98cccc locale_facets.tcc (num_get<>::_M_extract_float): According to 22.2.3.1...
2004-02-28  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (num_get<>::_M_extract_float):
	According to 22.2.3.1, p2, 'units' may be followed by 'e' with
	no 'decimal-point' in the middle: in this case too we must fix
	up __found_grouping; slightly tweak.
	* testsuite/22_locale/num_get/get/char/14.cc: New.
	* testsuite/22_locale/num_get/get/wchar_t/14.cc: New.

From-SVN: r78625
2004-02-28 20:37:54 +00:00
Eric Christopher 58adf39ce4 2.cc, [...]: Use dg-require-iconv.
2004-02-27  Eric Christopher  <echristo@redhat.com>
            Phil Edwards  <phil@codesourcery.com>

	* testsuite/22_locale/collate/compare/wchar_t/2.cc,
	testsuite/22_locale/collate/compare/wchar_t/wrapped_env.cc,
	testsuite/22_locale/collate/compare/wchar_t/wrapped_locale.cc,
	testsuite/22_locale/collate/hash/wchar_t/2.cc,
	testsuite/22_locale/collate/hash/wchar_t/wrapped_env.cc,
	testsuite/22_locale/collate/hash/wchar_t/wrapped_locale.cc,
	testsuite/22_locale/collate/transform/wchar_t/2.cc,
	testsuite/22_locale/collate/transform/wchar_t/wrapped_env.cc,
	testsuite/22_locale/collate/transform/wchar_t/wrapped_locale.cc:
	Use dg-require-iconv.
	* testsuite/lib/libstdc++.exp:  Load target-supports.exp.

From-SVN: r78582
2004-02-27 22:09:23 +00:00
Phil Edwards 238345774b default.exp: Update with comments.
2004-02-27  Phil Edwards  <phil@codesourcery.com>

	* testsuite/config/default.exp:  Update with comments.
	(${tool}_target_compile):  New wrapper routine.
	* testsuite/lib/dg-options.exp:  New file, with dg-require-iconv.
	* testsuite/lib/libstdc++.exp:  Update with comments and cosmetic
	fixes.
	(load_gcc_lib, v3track):  New routines.
	(v3-init):  Rename to libstdc++_init.
	* testsuite/libstdc++-dg/normal.exp:  No longer call v3-init.
	Move DEFAULT_CXXFLAGS handling into libstdc++_init.

From-SVN: r78580
2004-02-27 22:01:32 +00:00
Benjamin Kosnik 00d04db682 atomicity.h: Include c++config.h to get defines.
2004-02-27  Benjamin Kosnik  <bkoz@redhat.com>

	* config/cpu/hppa/atomicity.h: Include c++config.h to get defines.

	* src/misc-inst.cc (_S_atomicity_lock): Move to __gnu_cxx.

	* config/os/irix/irix5.2/atomicity.h: Merge..
	* config/os/irix/irix6.5/atomicity.h: Merge..
	* config/os/irix/atomicity.h: ...into this.
	* config/os/irix/atomic_word.h: New.
	* configure.host: Set atomic_word_dir for irix.

	* hppa/atomicity.h: Change __Atomicity_lock to _Atomicity_lock.
	* i386/atomicity.h: Same.
	* m68k/atomicity.h: Same.
	* sparc/atomicity.h: Same.

From-SVN: r78577
2004-02-27 20:56:46 +00:00
David Edelsohn c284a1261d atomicity.h: Use __gnu_cxx namespace.
* config/os/aix/atomicity.h: Use __gnu_cxx namespace. Remove
        static, and inline keyworks.

From-SVN: r78574
2004-02-27 13:59:31 -05:00
Paolo Carlini a8ea738974 locale_facets.tcc (num_get<>::_M_extract_float, [...]): If appropriate, call reserve on the __tmp_gruping string.
2004-02-27  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (num_get<>::_M_extract_float,
	num_get<>::_M_extract_int, money_get<>::_M_extract): If appropriate,
	call reserve on the __tmp_gruping string.
	(num_get<>::_M_extract_float): Don't append unnecessarily a
	char() to the returned string.
	* include/bits/locale_facets.tcc: Trivial reformattings.

From-SVN: r78565
2004-02-27 14:30:19 +00:00
Paolo Carlini f4bdbead2e locale_facets.h (money_get<>::_M_extract): Change signature: now takes a plain string&.
2004-02-27  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.h (money_get<>::_M_extract):
	Change signature: now takes a plain string&.
	* include/bits/locale_facets.tcc (money_get<>::_M_extract):
	Update consistently the definition; use the moneypunct cache
	to parse the value; use swap to change __units.
	(money_get<>::do_get(long double&)): Update call of _M_extract,
	avoid ctype::narrow, not correct wrt the standard.
	(money_get<>::do_get(string_type&)): Likewise, update call
	of _M_extract, use ctype::widen.
	* src/locale-inst.cc: Tweak instantiations of _M_extract.

From-SVN: r78562
2004-02-27 10:12:01 +00:00
Benjamin Kosnik 40fcf31b2f [multiple changes]
2004-02-26  Ian Lance Taylor  <ian@wasabisystems.com>

	* testsuite/demangle/abi_examples/01.cc: Expect error -2.
	* testsuite/demangle/abi_examples/02.cc: Likewise.
	* testsuite/demangle/regression/cw-11.cc: Likewise.
	* testsuite/demangle/regression/cw-16.cc: Change two expected
	results to match libiberty demangler output.

2004-02-26  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/10246
        * libsupc++/Makefile.am: Use libiberty demangler.
        (c_sources): Add cp-demangle.c.
        * libsupc++/Makefile.in: Regenerate.
        * src/Makefile.am (sources): Remove demangle.cc.
        * src/Makefile.in: Regenerate.
        * include/Makefile.am (bits_headers): Move demangle.h.
	(ext_headers): ...here.
        * include/Makefile.in: Regenerate.
        * include/bits/demangle.h: Move...
	* include/ext/demangle.h: ...here.
        * src/demangle.cc: Remove.

2004-02-26  Benjamin Kosnik  <bkoz@redhat.com>

        * include/bits/demangle.h: Add type template parameter to all
        templates with just an Allocator template parameter.

From-SVN: r78553
2004-02-27 03:21:16 +00:00
Benjamin Kosnik 2c5d0ae842 atomicity.h: New, forward declarations for __atomic_add and __exchange_and_add.
2004-02-25  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/atomicity.h: New, forward declarations for __atomic_add
	and __exchange_and_add.
	* config/cpu/generic/atomic_word.h: New, typdef for atomic word.
	* config/cpu/cris/atomic_word.h: Same.
	* config/cpu/sparc/atomic_word.h: Same.
	* include/bits/ios_base.h (_Callback_list::_M_remove_reference):
	Qualifiy with __gnu_cxx.
	(_Callback_list::_M_add_reference): Same.
	* include/bits/locale_classes.h (locale::facet::_M_add_reference): Add.
	(locale::facet::_M_remove_reference): Same.
	(locale::_Impl::_M_add_reference): Add.
	(locale::_Impl::_M_remove_reference): Same.
	* include/bits/basic_string.h (basic_string::_Rep::_M_refcopy): Same.
	(basic_string::_Rep::_M_dispose): Same.
	* src/ios.cc (ios_base::xalloc): Same.
	* src/ios_init.cc (ios_base::Init::Init): Same.
	(ios_base::Init::~Init): Same.
	* src/locale.cc (locale:🆔:_M_id): Same.
	* config/cpu/i486/atomicity.h: Use __gnu_cxx namespace. Remove
	static, and inline keyworks.
	* config/cpu/alpha/atomicity.h: Same.
	* 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/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.

	* src/Makefile.am (host_sources): Add atomicity.cc.
	(atomicity.cc): New rule.
	* src/Makefile.in: Regenerate.
	* include/Makefile.am (host_headers): Remove host atomicity.h.
	(host_headers): Add atomic_word.h.
	(bits_headers): Add bits atomicity.h.
	Change ATOMICITY_INC_SRCDIR to ATOMICITY_SRCDIR.
	* include/Makefile.in: Regenerate.
	* configure.host (atomic_word_dir): Add.
	* configure.ac: Substitute ATOMIC_WORD_SRCDIR. Change
	ATOMICITY_INC_SRCDIR to ATOMICITY_SRCDIR.
	* configure: Regenerate.
	* config/linker-map.gnu: Export __exchange_and_add, and __atomic_add.

	* testsuite/27_io/ios_base/cons/assign_neg.cc: Adjust line numbers.
	* testsuite/27_io/ios_base/cons/copy_neg.cc: Same.

From-SVN: r78544
2004-02-27 00:49:50 +00:00
Jonathan Wakely cec0e70b44 howto.html, [...]: Fix markup, more <link> tags.
2004-02-25  Jonathan Wakely  <redi@gcc.gnu.org>

	* docs/html/20_util/howto.html, docs/html/20_util/allocator.html,
	docs/html/ext/howto.html, docs/html/ext/mt_allocator.html:
	Fix markup, more <link> tags.

From-SVN: r78495
2004-02-26 11:35:06 +00:00
Carlo Wood bb9f8a85b1 * bits/demangle.h
namespace __gnu_cxx::demangler
(session<Allocator>::qualifier_list_Allocator): Add
(session<Allocator>::M_qualifier_list_alloc): Add
(session<Allocator>::decode_type_with_postfix):
Use M_qualifier_list_alloc instead of calling operator new/delete.

From-SVN: r78457
2004-02-25 21:31:01 +00:00
Paolo Carlini b79cef0683 re PR libstdc++/14252 (Problems with count and iterator_traits<istreambuf_iterator<char> >::difference_type)
2004-02-24  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/14252
	* include/bits/postypes.h (class streamoff): Add operator++(),
	operator++(int), operator--() and operator--(int).
	* testsuite/27_io/fpos/14252.cc: New.

From-SVN: r78388
2004-02-24 21:20:33 +00:00
Richard Sandiford 212063a844 locale_facets.tcc (num_get::_M_extract_int): Fix bounds error in handling of hex constants.
* include/bits/locale_facets.tcc (num_get::_M_extract_int): Fix bounds
	error in handling of hex constants.

From-SVN: r78385
2004-02-24 20:49:40 +00:00
Paolo Carlini 031e658e58 locale_facets.tcc (money_put<>::_M_insert): Prefer basic_string::append to operator+= and a temporary.
2004-02-24  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (money_put<>::_M_insert):
	Prefer basic_string::append to operator+= and a temporary.

From-SVN: r78360
2004-02-24 09:37:52 +00:00
Benjamin Kosnik 6f94dea785 vterminate.cc (__gnu_cxx::__verbose_terminate_handler): Only use fputs, not write.
2004-02-23  Benjamin Kosnik  <bkoz@redhat.com>

	* libsupc++/vterminate.cc (__gnu_cxx::__verbose_terminate_handler):
	Only use fputs, not write.

From-SVN: r78327
2004-02-23 19:17:06 +00:00
Benjamin Kosnik 20d0a40e83 malloc_allocator.h: Add operators ==, !=.
2004-02-23  Benjamin Kosnik  <bkoz@redhat.com>

	* include/ext/malloc_allocator.h: Add operators ==, !=.
	* include/ext/new_allocator.h: Add operators ==, !=.
	* include/ext/mt_allocator.h (__mt_alloc::tune): New.
	(__mt_alloc::_S_get_options): New.
	(__mt_alloc::_S_set_options): New.
	(__mt_alloc::_S_thread_key_destr): To _S_destroy_thread_key.
	(__mt_alloc::_S_no_of_bins): To _S_bin_size.
	Move functions out of line, simplify, format.
	* src/allocator.cc: Simplify explicit instantiations.
	* include/bits/allocator.h: Tweak.

From-SVN: r78315
2004-02-23 15:42:28 +00:00
Benjamin Kosnik f263b26e17 malloc_allocator.h: Add operators ==, !=.
2004-02-20  Benjamin Kosnik  <bkoz@redhat.com>

	* include/ext/malloc_allocator.h: Add operators ==, !=.
	* include/ext/new_allocator.h: Add operators ==, !=.
	* include/ext/mt_allocator.h (__mt_alloc::tune): New.
	(__mt_alloc::_S_get_options): New.
	(__mt_alloc::_S_set_options): New.
	(__mt_alloc::_S_thread_key_destr): To _S_destroy_thread_key.
	(__mt_alloc::_S_no_of_bins): To _S_bin_size.
	Move functions out of line, simplify, format.
	* src/allocator.cc: Simplify explicit instantiations.
	* include/bits/allocator.h: Tweak.

From-SVN: r78314
2004-02-23 15:41:43 +00:00
Paolo Carlini 20da06efdc locale_facets.tcc (money_put<>::_M_insert): Restructure formatting of value component...
2004-02-22  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (money_put<>::_M_insert):
	Restructure formatting of value component, first dealing with
	the non-decimal digits; use reserve.

2004-02-22  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.h (class money_get): Inherit
	from money_base too; tweak declaration of _M_extract, now
	parameterized on _Intl too.
	* include/bits/locale_facets.tcc (money_get<>::_M_extract):
	Update definition to use the cache; call reserve on __res to
	avoid multiple reallocations; fix parsing of sign component
	according to 22.2.6.1.2, p3.
	(money_get<>::do_get(long double&),
	money_get<>::do_get(string_type&)): Update calls of _M_extract.
	* src/locale-inst.cc:  Add instantiations of
	money_get::_M_extract<false> and money_get::_M_extract<true>.
	* testsuite/22_locale/money_get/get/char/14.cc: New.
	* testsuite/22_locale/money_get/get/wchar_t/14.cc: Ditto.

From-SVN: r78253
2004-02-22 11:13:27 +00:00
Mark Mitchell afc3bb58d5 * libsupc++/vterminate.cc
(__gnu_cxx::__verbose_terminate_handler): Guard against recursive
	calls to terminate.
	* src/demangle.cc (__cxa_demangle): Wrap in try-catch block.

From-SVN: r78235
2004-02-21 20:59:26 +00:00
Mark Mitchell e1efc7a028 testsuite_hooks.cc (__gnu_test::set_memory_limits): Do not set RLIMIT_AS on HP-UX.
* testsuite/testsuite_hooks.cc (__gnu_test::set_memory_limits): Do
	not set RLIMIT_AS on HP-UX.

From-SVN: r78233
2004-02-21 20:34:38 +00:00
Paolo Carlini fe932e504b locale_facets.h (class money_base): Add { _S_minus, _S_zero, _S_end } enum, _S_atoms.
2004-02-21  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.h (class money_base): Add { _S_minus,
	_S_zero, _S_end } enum, _S_atoms.
	(struct __moneypunct_cache<>): Parameterize on _Intl too; add
	_M_grouping_size, _M_curr_symbol_size, _M_positive_sign_size,
	_M_negative_sign_size, _M_atoms; tweak constructor consistently.
	(__moneypunct_cache<>::~__moneypunct_cache): Update.
	(__moneypunct_cache<>::_M_cache): Fill the cache.
	(class moneypunct): Tweak __cache_type typedef.
	(class money_put): Inherit from money_base too; tweak declaration
	of _M_insert, now parameterized on _Intl.
	* include/bits/locale_facets.tcc
	(struct __use_cache<__moneypunct_cache<_CharT, _Intl> >): New.
	(money_put<>::_M_insert): Update definition to use the cache;
	call reserve on __res to avoid multiple reallocations.
	(money_put<>::do_put(long double),
	money_put<>::do_put(const string_type&): Update calls of _M_insert.
	* config/locale/generic/monetary_members.cc
	(moneypunct<char, true>::_M_initialize_moneypunct,
	moneypunct<char, false>::_M_initialize_moneypunct,
	moneypunct<wchar_t, true>::_M_initialize_moneypunct,
	moneypunct<wchar_t, false>::_M_initialize_moneypunct): Update.
	* config/locale/gnu/monetary_members.cc: Likewise.
	* config/locale/gnu/monetary_members.cc
	(moneypunct<wchar_t, true>::~moneypunct(),
	moneypunct<wchar_t, false>::~moneypunct()): Likewise.
	* src/globals_locale.cc: Tweak fake_money_cache_c.
	* src/locale-inst.cc: Add instantiations for
	money_put::_M_insert<false> and money_put::_M_insert<true> and
	__moneypunct_cache<C, false>, __moneypunct_cache<C, true>.
	* src/locale_facets.cc: Define money_base::_S_atoms.
	* src/locale_init.cc: Update placement new of
	__moneypunct_cache<char, false>, __moneypunct_cache<char, true>,
	__moneypunct_cache<wchar_t, false>, __moneypunct_cache<wchar_T, true>.

	* config/locale/generic/numeric_members.cc: Clean up.
	* config/locale/gnu/numeric_members.cc: Likewise.
	* testsuite/22_locale/money_put/put/char/1.cc: Likewise.
	* testsuite/22_locale/money_put/put/char/2.cc: Likewise.
	* testsuite/22_locale/money_put/put/char/3.cc: Likewise.
	* testsuite/22_locale/money_put/put/wchar_t/1.cc: Likewise.
	* testsuite/22_locale/money_put/put/wchar_t/2.cc: Likewise.
	* testsuite/22_locale/money_put/put/wchar_t/3.cc: Likewise.

From-SVN: r78216
2004-02-21 09:26:35 +00:00
Mark Mitchell f196bdc447 9533-1.cc: Open FIFO for writing with ios_base::in|ios_base::out.
* testsuite/27_io/basic_filebuf/showmanyc/char/9533-1.cc: Open
	FIFO for writing with ios_base::in|ios_base::out.
	* 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: Open FIFO for writing
	with "r+".

From-SVN: r78195
2004-02-20 23:51:07 +00:00
David Edelsohn 2df93cf3c4 2.cc: Change input-charset from iso-8859-1 to ISO8859-1.
* 22_locale/collate/compare/wchar_t/2.cc: Change input-charset
	from iso-8859-1 to ISO8859-1.
	* 22_locale/collate/compare/wchar_t/wrapped_env.cc: Same.
	* 22_locale/collate/compare/wchar_t/wrapped_locale.cc: Same.
	* 22_locale/collate/hash/wchar_t/2.cc: Same.
	* 22_locale/collate/hash/wchar_t/wrapped_env.cc: Same.
	* 22_locale/collate/hash/wchar_t/wrapped_locale.cc: Same.
	* 22_locale/collate/transform/wchar_t/2.cc: Same.
	* 22_locale/collate/transform/wchar_t/wrapped_env.cc: Same.
	* 22_locale/collate/transform/wchar_t/wrapped_locale.cc: Same.

From-SVN: r78124
2004-02-19 17:07:55 -05:00
Paolo Carlini 2ddf25f217 locale_facets.h (money_get<>::_M_extract): New, helper for do_get.
2004-02-18  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.h (money_get<>::_M_extract):
	New, helper for do_get.
	(money_put<>::_M_insert): Likewise, for do_put.
	* include/bits/locale_facets.tcc (money_get<>::_M_extract,
	money_put<>::_M_insert): Define.
	(money_get<>::do_get(long double&), money_get<>::do_get(
	string_type&), money_put::do_put(long double),
	money_put::do_put(const string_type&)): Use the helpers.

From-SVN: r78037
2004-02-18 16:39:13 +00:00
Paolo Carlini 94b8de97c4 basic_file_stdio.cc (__gnu_internal::xwritev): Rewrite, avoiding recursion.
2004-02-18  Paolo Carlini  <pcarlini@suse.de>

	* config/io/basic_file_stdio.cc (__gnu_internal::xwritev):
	Rewrite, avoiding recursion.
	(__gnu_internal::xwrite): Minor tweaks.

From-SVN: r78015
2004-02-18 08:36:27 +00:00
Stefan Olsson 4d0bdcd6e1 mt_allocator.h: Removed the last pointer.
2004-02-17  Stefan Olsson  <stefan@xapa.se>

	* include/ext/mt_allocator.h: Removed the last
	pointer. Deallocated blocks are now added to the front of
	freelists as proposed by Felix Yen.  This gives roughly 10%
	performance boost and saves some memory.
	* docs/html/ext/mt_allocator.html: Change due to that deallocated
	blocks now are added to the front of freelists. The reason to this
	approach is also explained.

From-SVN: r78009
2004-02-18 01:21:10 +00:00
Paolo Carlini 6d4925e368 locale_facets.tcc (num_get<>::_M_extract_float, [...]): Simplify grouping fidelity conditional.
2004-02-17  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (num_get<>::_M_extract_float,
	num_get<>::_M_extract_int, money_get<>::do_get): Simplify
	grouping fidelity conditional.

From-SVN: r77948
2004-02-17 11:19:25 +00:00
Paolo Carlini 3e9b6cf4e0 13858.cc: Qualify exception with std::.
2004-02-16  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/27_io/basic_filebuf/overflow/char/13858.cc:
	Qualify exception with std::.
	* testsuite/27_io/basic_filebuf/overflow/char/9182-2.cc: Ditto.
	* testsuite/27_io/basic_filebuf/overflow/wchar_t/13858.cc: Ditto.
	* testsuite/27_io/basic_filebuf/seekoff/wchar_t/3.cc: Ditto.
	* testsuite/27_io/basic_filebuf/seekpos/wchar_t/1.cc: Ditto.
	* testsuite/27_io/basic_filebuf/sync/char/9182-1.cc: Ditto.

From-SVN: r77913
2004-02-16 19:28:06 +00:00
Paolo Carlini 835abbf7f0 13189.cc: Don't check for now that the catch block is not reached.
2004-02-16  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/ext/enc_filebuf/char/13189.cc: Don't check
	for now that the catch block is not reached.
	* testsuite/ext/enc_filebuf/wchar_t/13189.cc: Likewise.

From-SVN: r77906
2004-02-16 17:48:12 +00:00
Paolo Carlini b7e64db2a4 locale_facets.tcc (money_get::do_get(string_type&)): Fix parsing of the remaining sign characters.
2004-02-16  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (money_get::do_get(string_type&)):
	Fix parsing of the remaining sign characters.
	* 22_locale/money_get/get/char/2.cc: Tweak: now, correctly,
	the input is scanned 'til eof.
	* 22_locale/money_get/get/char/4.cc: Likewise.
	* 22_locale/money_get/get/wchar_t/2.cc: Likewise.
	* 22_locale/money_get/get/wchar_t/4.cc: Likewise.
	* 22_locale/money_get/get/char/8.cc: Tweak: override do_neg_format,
	not do_pos_format: the former is the only one that matters during
	input.
	* 22_locale/money_get/get/wchar_t/8.cc: Likewise.

	* 22_locale/money_get/get/char/6.cc: Minor tweak.
	* 22_locale/money_get/get/wchar_t/6.cc: Likewise.

From-SVN: r77896
2004-02-16 16:46:26 +00:00
David Asher 230377dc69 re PR libstdc++/11352 (crash while internal padding numeric 0)
2004-02-15  David Asher  <david.asher@cavium.com>

	PR libstdc++/11352
	* include/bits/locale_facets.tcc (__pad<>::_S_pad): Don't
	access __olds beyond __oldlen.

From-SVN: r77858
2004-02-15 17:19:00 +00:00
Paolo Carlini 45cbe93c0e 9182-2.cc: Make sure the exception is actually thrown.
2004-02-14  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/27_io/basic_filebuf/overflow/char/9182-2.cc: Make
	sure the exception is actually thrown.
	* testsuite/27_io/basic_filebuf/seekoff/wchar_t/3.cc: Ditto.
	* testsuite/27_io/basic_filebuf/seekpos/wchar_t/1.cc: Ditto.
	* testsuite/27_io/basic_filebuf/sync/char/9182-1.cc: Ditto.

From-SVN: r77828
2004-02-14 20:46:14 +00:00
Paolo Carlini ac3cadf042 re PR libstdc++/13858 (Bad error handling in basic_filebuf::imbue)
2004-02-14  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/13858
	* include/bits/fstream.tcc (basic_filebuf<>::_M_convert_to_external):
	In case of conversion errors, throw ios_failure; simplify.
	* testsuite/27_io/basic_filebuf/overflow/char/13858.cc: New.
	* testsuite/27_io/basic_filebuf/overflow/wchar_t/13858.cc: Ditto.
	* testsuite/27_io/basic_filebuf/overflow/char/9182-2.cc: Tweak,
	previously we didn't throw in case of conversion errors, instead
	just returned eof().
	* testsuite/27_io/basic_filebuf/seekoff/wchar_t/3.cc: Ditto.
	* testsuite/27_io/basic_filebuf/seekpos/wchar_t/1.cc: Ditto.
	* testsuite/27_io/basic_filebuf/sync/char/9182-1.cc: Ditto.

	* include/bits/fstream.tcc (basic_filebuf<>::overflow):
	Trivial simplification of a conditional.

From-SVN: r77812
2004-02-14 19:04:00 +00:00
Paolo Carlini 2e9a1f6b05 PR libstdc++/13731 (final part: writev)
2004-02-12  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/13731 (final part: writev)
	* config/io/basic_file_stdio.cc (__gnu_internal::xwrite):
	New, a wrapper around writev() handling partial writes.
	(__basic_file<char>::xwrite): Move to __gnu_internal and make
	static.
	(__basic_file<char>::xsputn): Update call.
	(__basic_file<char>::xsputn_2): Likewise.
	* config/io/basic_file_stdio.h (__basic_file<char>::write):
	Don't declare, now static.

From-SVN: r77717
2004-02-12 18:24:07 +00:00
Benjamin Kosnik 1c86f39d32 [multiple changes]
2004-02-11  Stefan Olsson  <stefan@xapa.se>

	* docs/html/ext/mt_allocator.html: New.

2004-02-11  Benjamin Kosnik  <bkoz@redhat.com>

	* docs/html/20_util/allocator.html: New file, consolidate
	allocator information here. Revamp.
	* docs/html/documentation.html: Change links.
	* docs/html/20_util/howto.html: Same.
	* docs/html/ext/howto.html: Same.

From-SVN: r77687
2004-02-12 01:11:48 +00:00
Paolo Carlini 98e9678463 PR libstdc++/13731 (first part: write)
2004-02-11  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/13731 (first part: write)
	* config/io/basic_file_stdio.h (__basic_file<char>::xwrite):
	New, declare.
	* config/io/basic_file_stdio.cc (__basic_file<char>::xwrite):
	Define it: a wrapper around write() handling partial write.
	(__basic_file<char>::xsputn): Use it.
	(__basic_file<char>::xsputn_2): Likewise.

From-SVN: r77680
2004-02-12 00:05:35 +00:00
Paolo Carlini a2af66c186 re PR libstdc++/14078 (Manipulators are slow)
2004-02-10  Paolo Carlini  <pcarlini@suse.de>
	    Petur Runolfsson  <peturr02@ru.is>

	PR libstdc++/14078
	* include/std/std_istream.h (operator>>(__istream_type& (*)
	(__istream_type&)), operator>>(__ios_type& (*)(__ios_type&)),
	operator>>(ios_base& (*)(ios_base&))): Declare inline.
	* include/std/std_ostream.h (operator<<(__ostream_type& (*)
	(__ostream_type&)), operator<<(__ios_type& (*)(__ios_type&)),
	operator<<(ios_base& (*) (ios_base&))): Likewise.
	* testsuite/performance/27_io/fmtflags_manipulators.cc: New.

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

From-SVN: r77650
2004-02-11 12:08:23 +00:00
Loren J. Rittle d318a8ba74 re PR libstdc++/14097 ([3.4 only] Severe disparity between stdio_filebuf and stdio_sync_filebuf.)
PR libstdc++/14097
	* config/linker-map.gnu: Add typeinfo and typeinfo name for
	__gnu_cxx::stdio_filebuf<char, std::char_traits<char> >.

From-SVN: r77636
2004-02-11 05:21:57 +00:00
Loren J. Rittle 64bd39ccc7 re PR libstdc++/14098 ([3.4 only] typeinfo issue with __gnu_cxx::stdio_sync_filebuf)
PR libstdc++/14098
	* config/linker-map.gnu: Add typeinfo and typeinfo name for
	__gnu_cxx::stdio_sync_filebuf<char, std::char_traits<char> >.

From-SVN: r77635
2004-02-11 05:03:13 +00:00
Loren J. Rittle a39c16dd5b * include/ext/pool_allocator.h: Include c++config.h.
From-SVN: r77577
2004-02-10 00:43:04 +00:00
Stefan Olsson 1ef0031284 mt_allocator.h: thread_id is unused in non threaded applications and now has a ifdef to remove...
2004-02-09  Stefan Olsson  <stefan@xapa.se>

	* include/ext/mt_allocator.h: thread_id is unused in non threaded
	applications and now has a ifdef to remove it completely on
	compilers without thread support. Include stdlib.h due to a
	compiler warning on getenv().

From-SVN: r77576
2004-02-10 00:31:53 +00:00
Paul Brook 1b81e1b544 configure.host: Explicitly check for atomicity.h file.
2004-02-09  Paul Brook  <paul@codesourcery.com>

	* libstdc++-v3/configure.host: Explicitly check for atomicity.h file.

From-SVN: r77570
2004-02-09 23:51:02 +00:00
Paolo Carlini cf0d2c4044 re PR libstdc++/14071 (locale::global doesn't always call setlocale)
2004-02-09  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/14071
	* src/locale_init.cc (locale::global(const locale&)): Use
	locale::name() in order to decide whether calling setlocale.
	* testsuite/22_locale/locale/global_locale_objects/14071.cc: New.

	* include/bits/locale_classes.h (locale::_Impl::_M_check_same_name()):
	Avoid computing &= unnecessarily.

From-SVN: r77568
2004-02-09 23:10:47 +00:00
James E Wilson 664fc5df4a re PR libstdc++/5625 ([mips] exception unwinding creates invalid pointer on mips)
PR libstdc++/5625
* libsuspc++/eh_personality.cc (PERSONALITY_FUNCTION): Use
__builtin_extend_pointer.

From-SVN: r77555
2004-02-09 13:20:33 -08:00
Paolo Carlini 86fd2b512a re PR libstdc++/14072 (basic_ios::imbue leaves dangling pointers)
2004-02-09  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/14072
	* include/bits/basic_ios.tcc (basic_ios<>::_M_cache_locale):
	Don't leave dangling pointers.
	* testsuite/27_io/basic_ios/imbue/14072.cc: New.
	* testsuite/22_locale/numpunct/members/pod/2.cc: Tweak, the num_put
	facet is needed in the final test.

From-SVN: r77526
2004-02-09 09:02:52 +00:00
Bernardo Innocenti f19e9e4d16 crossconfig.m4: Don't enable _GLIBCXX_USE_LFS on *-uclinux*.
* crossconfig.m4: Don't enable _GLIBCXX_USE_LFS on *-uclinux*.
	* configure: Regenerate.

From-SVN: r77523
2004-02-09 08:06:35 +01:00
Richard Henderson c38628062d re PR libstdc++/14026 (std::uncaught_exception is true although there are no uncaught exceptions (rethrow, ghost exception))
PR libstdc++/14026
        * libsupc++/eh_catch.cc (__cxa_begin_catch): Don't adjust
        uncaughtExceptions during nested catch rethrow.
        * testsuite/18_support/14026.cc: New.

From-SVN: r77492
2004-02-08 10:01:23 -08:00
Paolo Carlini fd95f498f3 basic_string.tcc (assign(const _CharT*, size_type)): When working in place remember to set the state to sharable (otherwise...
2004-02-08  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/basic_string.tcc (assign(const _CharT*, size_type)):
	When working in place remember to set the state to sharable
	(otherwise, _M_mutate does it).

From-SVN: r77487
2004-02-08 17:11:07 +00:00
Bernardo Innocenti ed6814f7b3 Remove trailing whitespace (see ChangeLog for longwinded description).
From-SVN: r77479
2004-02-08 05:46:42 +01:00
Paolo Carlini eee54836b1 basic_string.h: Fix comment.
2004-02-06  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/basic_string.h: Fix comment.

From-SVN: r77428
2004-02-06 23:02:45 +00:00
Paolo Carlini 15d7206087 stl_construct.h: Wrap overlong lines, reformat according to the coding standards.
2004-02-06  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/stl_construct.h: Wrap overlong lines, reformat
	according to the coding standards.
	* include/bits/stl_pair.h: Likewise.
	* include/bits/stl_raw_storage_iter.h: Likewise.
	* include/bits/stl_stack.h: Likewise.
	* include/bits/stl_uninitialized.h: Likewise.
	* include/bits/stream_iterator.h: Likewise.
	* include/bits/streambuf_iterator.h: Likewise.
	* include/bits/type_traits.h: Likewise.

From-SVN: r77425
2004-02-06 21:32:48 +00:00
Loren J. Rittle fbdf188d78 Add commit message included with files.
From-SVN: r77413
2004-02-06 19:20:30 +00:00
Paolo Carlini c5dd98f3ec 9507.cc: Adjust timings.
2004-02-06  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/27_io/basic_filebuf/open/char/9507.cc:
	Adjust timings.

From-SVN: r77392
2004-02-06 11:45:23 +00:00
Loren J. Rittle 462f4a816b * scripts/check_performance: Support PCH.
From-SVN: r77360
2004-02-06 00:51:34 +00:00
Geoffrey Keating 0314451df3 Index: libf2c/ChangeLog
Thu Feb  5 15:08:08 2004  Geoffrey Keating  <geoffk@apple.com>

	PR 12179
	* aclocal.m4 (GLIBCPP_EXPORT_INSTALL_INFO): Use 'gcc', not 'gcc-lib'.
	Add comment about poorly-named variables.
	* Makefile.in (libsubdir): Use 'gcc', not 'gcc-lib'.
	* configure: Regenerate.

Index: libstdc++-v3/ChangeLog
2004-02-05  Geoffrey Keating  <geoffk@apple.com>

	PR 12179
	* .cvsignore: New.
	* acinclude.m4 (GLIBCXX_EXPORT_INSTALL_INFO): Use 'gcc', not
	'gcc-lib'.  Add comment about poorly-named variables.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

From-SVN: r77351
2004-02-05 23:19:54 +00:00
Paolo Carlini d9010fcacc locale_facets.tcc (money_get::do_get(string_type&)): Thousands-sep are always optional...
2004-02-05  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (money_get::do_get(string_type&)):
	Thousands-sep are always optional; thousands-sep are not allowed
	after the decimal_point.
	* testsuite/22_locale/money_get/get/char/12.cc: New.
	* testsuite/22_locale/money_get/get/char/13.cc: New.
	* testsuite/22_locale/money_get/get/wchar_t/12.cc: New.
	* testsuite/22_locale/money_get/get/wchar_t/13.cc: New.

	* testsuite/22_locale/money_get/get/char/1.cc: Clean-up.
	* testsuite/22_locale/money_get/get/char/2.cc: Likewise.
	* testsuite/22_locale/money_get/get/char/3.cc: Likewise.
	* testsuite/22_locale/money_get/get/char/4.cc: Likewise.
	* testsuite/22_locale/money_get/get/wchar_t/1.cc: Likewise.
	* testsuite/22_locale/money_get/get/wchar_t/2.cc: Likewise.
	* testsuite/22_locale/money_get/get/wchar_t/3.cc: Likewise.
	* testsuite/22_locale/money_get/get/wchar_t/4.cc: Likewise.

	* testsuite/22_locale/money_get/get/char/9.cc: Fix citation from
	the standard.
	* testsuite/22_locale/money_get/get/wchar_t/9.cc: Likewise.

From-SVN: r77339
2004-02-05 20:13:37 +00:00
Richard Sandiford d232925f0b os_defines.h (_GLIBCXX_FIONREAD_TAKES_OFF_T): Define.
* config/os/irix/irix6.5/os_defines.h (_GLIBCXX_FIONREAD_TAKES_OFF_T):
	Define.
	* config/io/basic_file_stdio.cc (__basic_file<char>::showmanyc): Use
	it to decide whether FIONREAD should take an off_t or int argument.

From-SVN: r77336
2004-02-05 20:11:32 +00:00
Paolo Carlini 92ff3e4314 stl_function.h: Minor formatting changes.
2004-02-05  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/stl_function.h: Minor formatting changes.

From-SVN: r77316
2004-02-05 15:39:16 +00:00