Commit Graph

2201 Commits

Author SHA1 Message Date
Loren J. Rittle 677e7ddcee (re-open) PR libstdc++/12658
(re-open) PR libstdc++/12658
	* src/locale_init.cc (locale::locale): Remove ill-scoped mutex.
	(locale::global): Likewise.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	* testsuite/performance/ifstream_extract_int.cc: New.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

From-SVN: r74521
2003-12-11 01:08:14 +00:00