Commit Graph

1045 Commits

Author SHA1 Message Date
Paolo Carlini 0f910b4f4f type_traits: Implement is_const and is_volatile.
2004-12-07  Paolo Carlini  <pcarlini@suse.de>

	* include/tr1/type_traits: Implement is_const and is_volatile.
	* testsuite/testsuite_tr1.h (test_property): New.
	* testsuite/tr1/4_metaprogramming/type_properties/
	is_const/is_const.c: New.
	* testsuite/tr1/4_metaprogramming/type_properties/
	is_const/typedefs.cc: Likewise.
	* testsuite/tr1/4_metaprogramming/type_properties/
	is_volatile/is_volatile.cc: Likewise.
	* testsuite/tr1/4_metaprogramming/type_properties/
	is_volatile/typedefs.cc: Likewise.
	* testsuite/tr1/4_metaprogramming/composite_type_traits/
	is_arithmetic/is_arithmetic.cc: Slightly tweak to use ClassType
	from testsuite_tr1.h.
	* testsuite/tr1/4_metaprogramming/composite_type_traits/
	is_fundamental/is_fundamental.cc: Likewise.
	* testsuite/tr1/4_metaprogramming/primary_type_categories/
	is_array/is_array.cc: Likewise.
	* testsuite/tr1/4_metaprogramming/primary_type_categories/
	is_floating_point/is_floating_point.cc: Likewise.
	* testsuite/tr1/4_metaprogramming/primary_type_categories/
	is_integral/is_integral.cc: Likewise.
	* testsuite/tr1/4_metaprogramming/primary_type_categories/
	is_reference/is_reference.cc: Likewise.
	* testsuite/tr1/4_metaprogramming/primary_type_categories/
	is_void/is_void.cc: Likewise.

From-SVN: r91808
2004-12-07 16:40:46 +00:00
Paolo Carlini e21cb773e5 type_traits: Implement is_reference.
2004-12-06  Paolo Carlini  <pcarlini@suse.de>

	* include/tr1/type_traits: Implement is_reference.
	* testsuite/tr1/4_metaprogramming/primary_type_categories/
	is_reference/is_reference.cc: New.
	* testsuite/tr1/4_metaprogramming/primary_type_categories/
	is_reference/typedefs.cc: Likewise.

From-SVN: r91779
2004-12-06 15:47:05 +00:00
Paolo Carlini ae23f7575c re PR libstdc++/18837 (testsuite_performance.h:63: error: redefinition of 'struct mallinfo')
2004-12-05  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/18837
	* testsuite/testsuite_performance.h: Fix mallinfo macros for
	hpux.

From-SVN: r91757
2004-12-05 23:28:22 +00:00
Richard Henderson 192b2fc48c * testsuite/26_numerics/complex/pow.cc: Use -mieee on alpha.
From-SVN: r91738
2004-12-04 16:26:16 -08:00
Paolo Carlini 493bc46004 type_traits: New.
2004-12-04  Paolo Carlini  <pcarlini@suse.de>

	* include/tr1/type_traits: New.
	* include/Makefile.am: Add.
	* include/Makefile.in: Regenerate.
	* testsuite/testsuite_tr1.h: New.
	* testsuite/tr1/4_metaprogramming/composite_type_traits/
	is_arithmetic/is_arithmetic.cc: New.
	* testsuite/tr1/4_metaprogramming/composite_type_traits/
	is_arithmetic/typedefs.cc: Likewise.
	* testsuite/tr1/4_metaprogramming/composite_type_traits/
	is_fundamental/is_fundamental.cc: Likewise.
	* testsuite/tr1/4_metaprogramming/composite_type_traits/
	is_fundamental/typedefs.cc: Likewise.
	* testsuite/tr1/4_metaprogramming/helper_classes/
	true_false_type.cc: Likewise.
	* testsuite/tr1/4_metaprogramming/helper_classes/
	true_false_type_typedefs.cc: Likewise.
	* testsuite/tr1/4_metaprogramming/helper_classes/
	typedefs.cc: Likewise.
	* testsuite/tr1/4_metaprogramming/primary_type_categories/
	is_array/is_array.cc: Likewise.
	* testsuite/tr1/4_metaprogramming/primary_type_categories/
	is_array/typedefs.cc: Likewise.
	* testsuite/tr1/4_metaprogramming/primary_type_categories/
	is_floating_point/is_floating_point.cc: Likewise.
	* testsuite/tr1/4_metaprogramming/primary_type_categories/
	is_floating_point/typedefs.cc: Likewise.
	* testsuite/tr1/4_metaprogramming/primary_type_categories/
	is_integral/is_integral.cc: Likewise.
	* testsuite/tr1/4_metaprogramming/primary_type_categories/
	is_integral/typedefs.cc: Likewise.
	* testsuite/tr1/4_metaprogramming/primary_type_categories/
	is_void/is_void.cc: Likewise.
	* testsuite/tr1/4_metaprogramming/primary_type_categories/
	is_void/typedefs.cc: Likewise.

From-SVN: r91723
2004-12-04 09:08:42 +00:00
Paolo Carlini 9b8d9ac39f testsuite_io.h (class sync_buf): New, templatized version of sync_streambuf; add typedefs for streambuf/wstreambuf.
2004-12-02  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/testsuite_io.h (class sync_buf): New, templatized
	version of sync_streambuf; add typedefs for streambuf/wstreambuf.
	(class fail_buf): Likewise, for fail_streambuf.
	(class fail_num_get): Templatize and add char/wchar_t typedefs.
	(class fail_num_put): Likewise.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/
	exceptions_badbit_throw.cc: Use the latter.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/
	exceptions_failbit_throw.cc: Likewise.
	* testsuite/27_io/basic_ostream/inserters_arithmetic/char/
	exceptions_badbit_throw.cc: Likewise.
	* testsuite/27_io/basic_ostream/inserters_arithmetic/char/
	exceptions_failbit_throw.cc: Likewise.

From-SVN: r91635
2004-12-02 13:24:46 +00:00
Paolo Carlini f8e7ffa673 1.cc: New.
2004-12-01  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/27_io/basic_istream/get/wchar_t/1.cc: New.
	* testsuite/27_io/basic_istream/get/wchar_t/2.cc: Likewise.
	* testsuite/27_io/basic_istream/get/wchar_t/3.cc: Likewise.
	* testsuite/27_io/basic_istream/ignore/wchar_t/1.cc: Likewise.
	* testsuite/27_io/basic_istream/ignore/wchar_t/2.cc: Likewise.
	* testsuite/27_io/basic_istream/ignore/wchar_t/3.cc: Likewise.
	* testsuite/27_io/basic_istream/ignore/wchar_t/6360.cc: Likewise.
	* testsuite/27_io/basic_istream/ignore/wchar_t/7220.cc: Likewise.

From-SVN: r91565
2004-12-01 15:46:58 +00:00
Paolo Carlini 4f70f9d237 18654.cc: Use better names.
2004-11-29  Paolo Carlini  <pcarlini@suse.de>

        * testsuite/21_strings/basic_string/capacity/char/18654.cc: Use
	better names.
        * testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc: Same.

From-SVN: r91469
2004-11-29 13:29:54 +00:00
Paolo Carlini d1a7222cce re PR libstdc++/18654 (Shrink-to-fit std::string::reserve() calls can reallocate & copy string contents unnecessarily)
2004-11-29  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/18654
	* include/bits/basic_string.tcc (_Rep::_S_create): When shrinking,
	do not round to pagesize.
	* testsuite/21_strings/basic_string/capacity/char/18654.cc: New.
	* testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc: New.

From-SVN: r91466
2004-11-29 12:59:53 +00:00
Paolo Carlini fcfbdb74da 2.cc: Fix typo.
2004-11-27  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/27_io/basic_istream/getline/wchar_t/2.cc: Fix typo.
	* testsuite/27_io/basic_istream/getline/wchar_t/4.cc: Likewise.

	* testsuite/22_locale/time_put/put/char/17038.cc: Use VERIFY.
	* testsuite/22_locale/time_put/put/wchar_t/17038.cc: Likewise.
	* testsuite/27_io/basic_filebuf/underflow/wchar_t/11603.cc: Likewise.
	* testsuite/27_io/basic_ios/exceptions/char/2.cc: Likewise.

From-SVN: r91368
2004-11-27 09:34:06 +00:00
Paolo Carlini 75a25e3f65 DR 243.
2004-11-26  Paolo Carlini  <pcarlini@suse.de>

	DR 243. get and getline when sentry reports failure [WP]
	* include/bits/istream.tcc (istream<>::get, istream<>::getline):
	Store a null character only if the array has a non-zero size.
	* src/istream.cc (istream<char>::getline, istream<wchar_t>::getline):
	Likewise.
	* testsuite/27_io/basic_istream/get/char/3.cc: New.
	* testsuite/27_io/basic_istream/getline/char/6.cc: New.
	* testsuite/27_io/basic_istream/getline/wchar_t/6.cc: New.
	* docs/html/ext/howto.html: Add an entry for DR 243.

	* testsuite/27_io/basic_istream/getline/wchar_t/1.cc: New.
	* testsuite/27_io/basic_istream/getline/wchar_t/2.cc: New.
	* testsuite/27_io/basic_istream/getline/wchar_t/3.cc: New.
	* testsuite/27_io/basic_istream/getline/wchar_t/4.cc: New.
	* testsuite/27_io/basic_istream/getline/wchar_t/5.cc: New.

From-SVN: r91348
2004-11-26 20:34:27 +00:00
Kelley Cook a38fb0a7a4 Makefile.in, aclocal.m4: Regenerate with automake 1.9.3.
2004-11-24  Kelley Cook  <kcook@gcc.gnu.org>

	* Makefile.in, aclocal.m4: Regenerate with automake 1.9.3.
	* include/Makefile.in: Likewise.
	* libmath/Makefile.in: Likewise.
	* libsupc++/Makefile.in: Likewise.
	* po/Makefile.in: Likewise.
	* src/Makefile.in: Likewise.
	* testsuite/Makefile.in: Likewise.

From-SVN: r91197
2004-11-24 21:12:26 +00:00
Benjamin Kosnik f2ede5d621 [multiple changes]
2004-11-24  Benjamin Kosnik  <bkoz@redhat.com>

	* include/Makefile.am (tr1_headers): Add utility, functional.
	* include/Makefile.in: Regenerate.

2004-11-24  Chris Jefferson  <chris@bubblescope.net>

	* include/tr1/tuple(operator!=): Change operator
	definition to match (draft) technical report.
	(operator>): Same.
	(operator<=): Same.
	(operator>=): Same.
	(ref): Move to include/tr1/functional.
	(cref): Same.
	(tuple_size<pair>): Move to include/tr1/utility.
	(tuple_element<,pair>): Same.
	* include/tr1/functional: New.
	* include/tr1/utility: New.
	* testsuite/tr1/6_container/utility/pair.cc: New.

From-SVN: r91171
2004-11-24 16:04:47 +00:00
Chris Jefferson 278d4cc485 testsuite_iterators.h: New.
2004-11-23  Chris Jefferson  <chris@bubblescope.net>

        * testsuite/testsuite_iterators.h: New.
        * testsuite/25_algorithms/search_n/iterator.cc: New.
        * testsuite/performance/25_algorithms/search_n.cc: New.

From-SVN: r91139
2004-11-24 06:24:10 +00:00
John David Anglin 1df8e83465 target-libpath.exp: New file defining set_ld_library_path_env_vars and restore_ld_library_path_env_vars.
* lib/target-libpath.exp: New file defining set_ld_library_path_env_vars
	and restore_ld_library_path_env_vars.
	* g++.dg/compat/compat.exp, lib/g++.exp, lib/gcc-dg.exp,
	lib/gfortran.exp, lib/objc.exp, lib/treelang.exp: Use new procs.
	* ada/acats/run_acats (LD_LIBRARY_PATH): Add previous LD_LIBRARY_PATH
	to LD_LIBRARY_PATH.  Export LD_LIBRARY_PATH.

	* testsuite/lib/libffi-dg.exp: Use new procs in target-libpath.exp.

	* testsuite/lib/libjava.exp,
	testsuite/libjava.jacks/jacks.exp: Use new procs in target-libpath.exp.

	* testsuite/lib/libmudflap.exp: Use new procs in target-libpath.exp.

	* testsuite/lib/libstdc++.exp: Use new procs in target-libpath.exp.

From-SVN: r91137
2004-11-24 04:39:41 +00:00
Benjamin Kosnik 0aa06b18fc doxygroups.cc: Add std::tr1 namespace.
2004-11-23  Benjamin Kosnik  <bkoz@redhat.com>

	* docs/doxygen/doxygroups.cc: Add std::tr1 namespace.
	* docs/doxygen/run_doxygen: Renames for std::tr1.
	* docs/doxygen/user.cfg.in: Add cxxabi.h.
	* include/bits/*.tcc: Add file markup.
	* include/bits/allocator.h: Add link to allocator.html.
	* include/bits/atomicity.h: Add file markup.
	* include/bits/concurrence.h: Same.
	* include/bits/functexcept.h: Same.
	* include/ext*: Adjust file markup, remove GCC3 bits.
	* include/std/*: Adjust file markup, remove bits about renamed files.
	* libsupc++/cxxabi.h: Add file markup.
	* testsuite/20_util/memory/auto_ptr/assign_neg.cc: Adjust line numbers.

From-SVN: r91135
2004-11-24 04:11:23 +00:00
Paolo Carlini c55f9f781b 1.cc: In the checks use...
2004-11-19  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/22_locale/time_get/get_date/char/1.cc: In the checks
	use, more correctly (and consistently with other testcases) the
	return value of the facet (the iterator arguments are by value).
	* testsuite/22_locale/time_get/get_date/char/12791.cc: Likewise.
	* testsuite/22_locale/time_get/get_date/wchar_t/1.cc: Likewise.
	* testsuite/22_locale/time_get/get_date/wchar_t/12791.cc: Likewise.
	* testsuite/22_locale/time_get/get_monthname/char/1.cc: Likewise.
	* testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc: Likewise.
	* testsuite/22_locale/time_get/get_time/char/1.cc: Likewise.
	* testsuite/22_locale/time_get/get_time/wchar_t/1.cc: Likewise.
	* testsuite/22_locale/time_get/get_weekday/char/1.cc: Likewise.
	* testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc: Likewise.
	* testsuite/22_locale/time_get/get_year/char/1.cc: Likewise.
	* testsuite/22_locale/time_get/get_year/wchar_t/1.cc: Likewise.

From-SVN: r90938
2004-11-19 21:48:21 +00:00
Paolo Carlini 1ecba09e20 sum_diff.cc: Use VERIFY.
2004-11-18  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/26_numerics/numeric/sum_diff.cc: Use VERIFY.
	* testsuite/ext/array_allocator/1.cc: Likewise.
	* testsuite/ext/array_allocator/2.cc: Likewise.
	* testsuite/ext/array_allocator/3.cc: Likewise.
	* testsuite/ext/enc_filebuf/char/13598.cc: Likewise.

From-SVN: r90878
2004-11-18 19:11:41 +00:00
Paolo Carlini 14492f0b1e DR 434.
2004-11-18  Paolo Carlini  <pcarlini@suse.de>

	DR 434. bitset::to_string() hard to use [Ready]
	* include/std/std_bitset.h (to_string): Add three overloads, taking
	fewer template arguments.
	* docs/html/ext/howto.html: Add an entry for DR 434.
	* testsuite/23_containers/bitset/to_string/1.cc: New.

From-SVN: r90854
2004-11-18 09:52:57 +00:00
Benjamin Kosnik fcb94d103b testsuite_abi.cc (check_version): Add GLIBCXX_3.4.4.
2004-11-15  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/testsuite_abi.cc (check_version): Add GLIBCXX_3.4.4.

From-SVN: r90681
2004-11-15 19:11:59 +00:00
Andrew Pinski 690e11b8f5 re PR testsuite/14264 (testsuite should set LC_ALL/LANG to C)
2004-11-12  Andrew Pinski  <pinskia@physics.uc.edu>

        PR other/14264
        * lib/g++.exp: Set LC_ALL and LANG to C.
        * lib/gcc-dg.exp: Likewise.
        * lib/gfortran.exp: Likewise.
        * lib/objc.exp: Likewise.
        * lib/treelang.exp: Likewise.
2004-11-12  Andrew Pinski  <pinskia@physics.uc.edu>

        PR other/14264
        * testsuite/lib/libstdc++.exp: Set LC_ALL and LANG to C.
2004-11-12  Andrew Pinski  <pinskia@physics.uc.edu>

        PR other/14264
        * testsuite/lib/libjava.exp: Set LC_ALL and LANG to C.

From-SVN: r90539
2004-11-12 11:43:57 -08:00
Paolo Carlini 15fb0dbeb7 streambuf_iterator.h (class istreambuf_iterator): Consistently use _M_c to cache the current char...
2004-11-08  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/streambuf_iterator.h (class istreambuf_iterator):
	Consistently use _M_c to cache the current char, i.e., not only
	when operator++(int) is involved; change _M_c to mutable.
	(_M_get()): Always save the return value of _M_sbuf->sgetc() into
	_M_c.
	* testsuite/22_locale/time_get/get_monthname/char/1.cc: Fix
	(long standing) typo.
	* testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc: Likewise.
	* testsuite/22_locale/time_get/get_weekday/char/1.cc: Likewise.
	* testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc: Likewise.

From-SVN: r90275
2004-11-08 17:55:54 +00:00
Paolo Carlini 32890afef4 ifstream_getline-2.cc: New.
2004-11-07  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/performance/27_io/ifstream_getline-2.cc: New.

From-SVN: r90229
2004-11-07 12:35:48 +00:00
Benjamin Kosnik bd80bd9b93 re PR libstdc++/17922 (Spurious warnings about std::ios_base::seekdir)
2004-11-02  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/17922
	* include/bits/ios_base.h : Add enum values.
	* testsuite/testsuite_hooks.h (bitmask_operators): Add function.
	* testsuite/27_io/ios_base/types/fmtflags/bitmask_operators.cc: New.
	* testsuite/27_io/ios_base/types/fmtflags/case_label.cc: New.
	* testsuite/27_io/ios_base/types/iostate/bitmask_operators.cc: New.
	* testsuite/27_io/ios_base/types/iostate/case_label.cc: New.
	* testsuite/27_io/ios_base/types/openmode/bitmask_operators.cc: New.
	* testsuite/27_io/ios_base/types/openmode/case_label.cc: New.
	* testsuite/27_io/ios_base/types/seekdir/case_label.cc: New.

	* config/io/c_io_stdio.h (__ios_flags): Mark deprecated.
	* src/ios.cc: 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: r89996
2004-11-02 19:00:19 +00:00
Momchil Velikov c137586a8e re PR libstdc++/18185 ([3.4 only] Unhandled exceptions leak)
2004-11-01  Momchil Velikov  <velco@fadata.bg>

	PR libstdc++/18185
	* libsupc++/eh_globals.cc (get_globals_dtor): Delete unhandled
	exceptions.
	* testsuite/thread/18185.cc: New.

From-SVN: r89962
2004-11-01 22:47:33 +00:00
Benjamin Kosnik 8d511b9097 re PR tree-optimization/16728 (std::set tests for allocator/insert core in make check-performance)
2004-10-31  Benjamin Kosnik  <bkoz@redhat.com>

	PR c++/16728
	* testsuite/23_containers/set/modifiers/16728.cc: New.

From-SVN: r89921
2004-11-01 00:02:42 +00:00
Paolo Carlini de2d7877ba bitmap_allocator.h (allocate(size_type)): Minor tweak.
2004-10-30  Paolo Carlini  <pcarlini@suse.de>

	* include/ext/bitmap_allocator.h (allocate(size_type)): Minor tweak.

	* testsuite/ext/bitmap_allocator/check_delete.cc: New.
	* testsuite/ext/bitmap_allocator/check_new.cc: Likewise.

From-SVN: r89899
2004-10-30 21:44:04 +00:00
Geoffrey Keating 8b5a12daa0 12658_thread-1.cc: Only xfail on Linux.
* testsuite/22_locale/locale/cons/12658_thread-1.cc: Only xfail
	on Linux.

From-SVN: r89872
2004-10-30 00:54:22 +00:00
Chris Jefferson 158414d635 stl_algo.h (find_first_of(,,,,pred)): Remove invalid EqualOpConcept.
2004-10-29  Chris Jefferson  <chris@bubblescope.net>

	* include/bit/stl_algo.h (find_first_of(,,,,pred)):
	Remove invalid EqualOpConcept.
	* testsuite/25_algorithms/find_first_of/concept_check_1.cc: New.

From-SVN: r89853
2004-10-29 21:44:55 +00:00
Benjamin Kosnik a53f986f91 testsuite_allocator.h (check_delete): New.
2004-10-29  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/testsuite_allocator.h (check_delete): New.
	(check_new): Simplify.
	* testsuite/ext/array_allocator/check_delete.cc: New.
	* testsuite/ext/array_allocator/check_new.cc: Simplify.
	* testsuite/ext/debug_allocator/check_delete.cc: New.
	* testsuite/ext/debug_allocator/check_new.cc: Simplify.
	* testsuite/ext/malloc_allocator/check_delete.cc: New.
	* testsuite/ext/malloc_allocator/check_new.cc: Simplify.
	* testsuite/ext/mt_allocator/check_delete.cc: New.
	* testsuite/ext/mt_allocator/check_new.cc: Simplify.
	* testsuite/ext/new_allocator/check_delete.cc: New.
	* testsuite/ext/new_allocator/check_new.cc: Simplify.
	* testsuite/ext/pool_allocator/check_delete.cc: New.
	* testsuite/ext/pool_allocator/check_new.cc: Simplify.

From-SVN: r89850
2004-10-29 21:03:07 +00:00
Benjamin Kosnik 6571df13b4 mt_allocator.h (__common_pool_policy): Add template template parameter for pool class type.
2004-10-28  Benjamin Kosnik  <bkoz@redhat.com>

	* include/ext/mt_allocator.h (__common_pool_policy): Add template
	template parameter for pool class type.
	(__per_type_pool_policy): Same.
	(__mt_allocator): Don't inherit policy. Qualify policy_type calls.
	* testsuite/ext/mt_allocator/check_deallocate_null.cc: Fix.
	* testsuite/ext/mt_allocator/check_deallocate_null_thread.cc: Same.
	* testsuite/ext/mt_allocator/deallocate_global-2.cc: Same.
	* testsuite/ext/mt_allocator/deallocate_global-4.cc: Same.
	* testsuite/ext/mt_allocator/deallocate_global_thread-1.cc: Same.
	* testsuite/ext/mt_allocator/deallocate_global_thread-3.cc: Same.
	* testsuite/ext/mt_allocator/deallocate_local-2.cc: Same.
	* testsuite/ext/mt_allocator/deallocate_local-4.cc: Same.
	* testsuite/ext/mt_allocator/deallocate_local_thread-1.cc: Same.
	* testsuite/ext/mt_allocator/deallocate_local_thread-3.cc: Same.
	* testsuite/ext/mt_allocator/instantiate.cc: Same.
	* testsuite/ext/mt_allocator/tune-1.cc: Same.
	* testsuite/ext/mt_allocator/tune-2.cc: Same.
	* testsuite/ext/mt_allocator/tune-3.cc: Same.
	* testsuite/ext/mt_allocator/tune-4.cc: Same.

From-SVN: r89776
2004-10-28 20:46:08 +00:00
Benjamin Kosnik 210d7a8f70 array_allocator.h (array::allocate): Check for valid array object, use its size member function directly.
2004-10-26  Benjamin Kosnik  <bkoz@redhat.com>

	* include/ext/array_allocator.h (array::allocate): Check for valid
	array object, use its size member function directly.
	* testsuite/ext/array_allocator/3.cc: New.
	* docs/html/20_util/allocator.html: Add docs.

From-SVN: r89573
2004-10-26 06:37:10 +00:00
Benjamin Kosnik 7c8bf027bc Makefile.am (GLIBCXX_INCLUDES): Add.
2004-10-25  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/Makefile.am (GLIBCXX_INCLUDES): Add.
	(AUTOMAKE_OPTIONS): Add nostdinc.
	* testsuite/Makefile.in: Regenerate.
	* scripts/testsuite_flags.in (build-includes): Remove redundant
	search for libsupc++.
	* fragment.am: Clean.

From-SVN: r89550
2004-10-25 20:32:40 +00:00
Benjamin Kosnik a520f0b0ae [multiple changes]
2004-10-25  Benjamin Kosnik  <bkoz@redhat.com>

	* include/Makefile.am (tr1_headers): Add tuple.
	* include/Makefile.in: Regenerate.

2004-10-25  Chris Jefferson  <chris@bubblescope.net>

        * include/tr1/tuple: Implementation of tuple from library TR.
	* testsuite/tr1/6_containers/tuple/tuple_element.cc: New.
	* testsuite/tr1/6_containers/tuple/tuple_size.cc: New.
	* testsuite/tr1/6_containers/tuple/comparison_operators/comparisons.cc:
	New.
	* testsuite/tr1/6_containers/tuple/cons/assignment.cc: New.
	* testsuite/tr1/6_containers/tuple/cons/big_tuples.cc: New.
	* testsuite/tr1/6_containers/tuple/cons/constructor.cc: New.
	* testsuite/tr1/6_containers/tuple/creation_functions/make_tuple.cc:
	New.
	* testsuite/tr1/6_containers/tuple/creation_functions/tie.cc: New.
	* testsuite/tr1/6_containers/tuple/element_access/get.cc: New.

From-SVN: r89548
2004-10-25 19:05:58 +00:00
Eric Botcazou 1e02510f05 re PR other/18138 (libgcc_s.so.1 not found by 64-bit testsuite)
gcc/testsuite:
	PR other/18138
	* lib/g++.exp: Accept more than one multilib libgcc.
	* lib/gcc-dg.exp: Likewise.
	* lib/objc.exp: Likewise.
	* lib/treelang.exp: Likewise.
	* lib/gfortran.exp: Likewise.

libffi:
	PR other/18138
	* testsuite/lib/libffi-dg.exp: Accept more than one multilib
	libgcc.

libjava:
	PR other/18138
	* testsuite/lib/libjava.exp: Accept more than one multilib
	libgcc.

libmudflap!:
	PR other/18138
	* testsuite/lib/libmudflap.exp: Accept more than one multilib
	libgcc.

libstdc++-v3:
	PR other/18138
	* testsuite/lib/libstdc++.exp: Accept more than one multilib
	libgcc.

From-SVN: r89528
2004-10-25 09:01:15 +00:00
Paolo Carlini ec61e852bc basic_string.h (_Rep::_M_is_safe, [...]): New, use througout.
2004-10-25  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/basic_string.h (_Rep::_M_is_safe, _M_check_length,
	_M_move, _M_copy, _M_assign): New, use througout.
	(operator+=(_CharT)): Define in terms of push_back.
	(append(const basic_string&)): Define here, inline, and simplify,
	don't use the full _M_replace_safe.
	(append(size_type, _CharT)): Likewise, don't use _M_replace_aux.
	(push_back): Likewise.
	(assign(const basic_string&)): Define here, inline.
	* include/bits/basic_string.tcc (append(const _CharT* s, size_type):
	Fix: when s points inside the _Rep, upon reallocation (reserve) we
	were copying from deallocated memory.
	(append(const basic_string&, size_type, size_type)): Simplify,
	don't use _M_replace_safe.
	(replace(size_type, size_type, const _CharT*, size_type)): Slightly
	tweak.
	(reserve): Likewise.
	* testsuite/21_strings/basic_string/append/char/2.cc: New.
	* testsuite/21_strings/basic_string/append/char/3.cc: Likewise.
	* testsuite/21_strings/basic_string/append/wchar_t/2.cc: Likewise.
	* testsuite/21_strings/basic_string/append/wchar_t/3.cc: Likewise.

	* testsuite/21_strings/basic_string/assign/char/3.cc: Remove junk.
	* testsuite/21_strings/basic_string/assign/wchar_t/3.cc: Likewise.

From-SVN: r89526
2004-10-25 08:45:04 +00:00
Andrew Pinski ed3eaab807 deallocate_global-2.c: s/value_t/value_type/.
2004-10-23  Andrew Pinski  <pinskia@physics.uc.edu>

        * testsuite/ext/mt_allocator/deallocate_global-2.c:
        s/value_t/value_type/. s/traits_t/traits_type/.
        s/policy_t/policy_type/. s/allocator_t/allocator_type/.
        s/string_t/string_type/. s/list_t/list_type/.
        * testsuite/ext/mt_allocator/deallocate_global-4.cc: Likewise.
        * testsuite/ext/mt_allocator/deallocate_global_thread-1.cc: Likewise.
        * testsuite/ext/mt_allocator/deallocate_global_thread-3.cc: Likewise.
        * testsuite/ext/mt_allocator/deallocate_local-2.cc: Likewise.
        * testsuite/ext/mt_allocator/deallocate_local-4.cc: Likewise.
        * testsuite/ext/mt_allocator/deallocate_local_thread-1.cc: Likewise.
        * testsuite/ext/mt_allocator/deallocate_local_thread-3.cc: Likewise.

From-SVN: r89493
2004-10-23 12:41:06 -07:00
Benjamin Kosnik aed305a929 array (array): Make safe for zero-sized arrays.
2004-10-21  Benjamin Kosnik  <bkoz@redhat.com>

	* include/tr1/array (array): Make safe for zero-sized arrays.
	(array::end): Return one past the end.
	(array::at): Use __throw_out_of_range, include functexcept.h.
	(operator==): Implement.
	(operator!=): Same.
	(operator<): Same.
	(operator>): Same.
	(operator>=): Same.
	(operator<=): Same.
	* testsuite/tr1/6_containers/array/capacity/(empty.cc,
	max_size.cc, size.cc): New.
	* testsuite/tr1/6_containers/array/comparison_operators/(equal.cc,
	greater.cc, greater_or_equal.cc, less.cc, less_or_equal.cc,
	not_equal): New.
	* testsuite/tr1/6_containers/array/cons/aggregate_initialization.cc:
	New.
	* testsuite/tr1/6_containers/array/element_access/at_out_of_range.cc:
	New.
	* testsuite/tr1/6_containers/array/iterators/end_is_one_past.cc: New.
	* testsuite/tr1/6_containers/array/requirements/(contiguous.cc,
	instantiate, typedefs, zero_size_arrays): New.

From-SVN: r89429
2004-10-22 05:32:16 +00:00
Paolo Carlini 996e539545 vector.tcc (_M_insert_aux, [...]): Check at the outset that we are not trying to exceed max_size...
2004-10-21  Paolo Carlini  <pcarlini@suse.de>
	    Dhruv Matani  <dhruvbird@gmx.net>
	    Nathan Myers  <ncm@cantrip.org>

	* include/bits/vector.tcc (_M_insert_aux, _M_fill_insert,
	_M_range_insert): Check at the outset that we are not trying
	to exceed max_size, then deal properly with __len overflows.
	* testsuite/23_containers/vector/modifiers/insert/1.cc: New.

	* testsuite/testsuite_allocator.h: Remove redundant include.

Co-Authored-By: Dhruv Matani <dhruvbird@gmx.net>
Co-Authored-By: Nathan Myers <ncm@cantrip.org>

From-SVN: r89377
2004-10-21 14:53:02 +00:00
Paolo Carlini a063e891bd bitmap_allocator.h (allocate): Throw std::bad_alloc when n > max_size().
2004-10-20  Paolo Carlini  <pcarlini@suse.de>

	* include/ext/bitmap_allocator.h (allocate): Throw std::bad_alloc
	when n > max_size().
	* include/ext/malloc_allocator.h (allocate): Likewise.
	* include/ext/mt_allocator.h (allocate): Likewise.
	* include/ext/new_allocator.h (allocate): Likewise.
	* include/ext/array_allocator.h: Use __throw_bad_alloc().
	* include/ext/pool_allocator.h: Use __builtin_expect.
	* testsuite/ext/array_allocator/check_allocate_max_size.cc: New.
	* testsuite/ext/bitmap_allocator/check_allocate_max_size.cc: Likewise.
	* testsuite/ext/malloc_allocator/check_allocate_max_size.cc: Likewise.
	* testsuite/ext/mt_allocator/check_allocate_max_size.cc: Likewise.
	* testsuite/ext/new_allocator/check_allocate_max_size.cc: Likewise.
	* testsuite/ext/pool_allocator/check_allocate_max_size.cc: Likewise.
	* testsuite/testsuite_allocator.h (check_allocate_max_size): New test.

From-SVN: r89351
2004-10-21 00:06:02 +00:00
Paolo Carlini b67ed5e845 list_sort_search.cc: Include <ext/new_allocator.h>.
2004-10-19  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/performance/20_util/allocator/list_sort_search.cc:
	Include <ext/new_allocator.h>.
	* testsuite/performance/20_util/allocator/map_mt_find.cc: Likewise.

From-SVN: r89269
2004-10-19 08:56:32 +00:00
Paolo Carlini 0d6b41f2dd bitmap_allocator.h: Qualify ::operator delete.
2004-10-15  Paolo Carlini  <pcarlini@suse.de>

	* include/ext/bitmap_allocator.h: Qualify ::operator delete.
	* src/bitmap_allocator.cc: Likewise.
	* src/mt_allocator.cc: Use ::operator delete, not delete,
	consistently with ::operator new.

	* include/ext/bitmap_allocator.h (deallocate): Check for null
	pointer.
	* testsuite/ext/bitmap_allocator/check_deallocate_null.cc: New.
	* testsuite/testsuite_allocator.h (check_deallocate_null): Add test.

From-SVN: r89089
2004-10-15 10:54:57 +00:00
Benjamin Kosnik 5d1b2a1e42 mt_allocator.h (__mt_alloc::deallocate): Check for null pointer.
2004-10-14  Benjamin Kosnik  <bkoz@redhat.com>

	* include/ext/mt_allocator.h (__mt_alloc::deallocate): Check for
	null pointer.
	* include/ext/pool_allocator.h (debug_allocator::deallocate):
	Check pointer value.
	* include/ext/debug_allocator.h (debug_allocator::deallocate):
	Throw exceptions, don't abort.
	* include/ext/array_allocator.h
	(array_allocator_base::deallocate): Remove unused parameters.
	* testsuite/testsuite_allocator.h (check_deallocate_null): New.
	* testsuite/ext/mt_allocator/check_deallocate_null.cc: New.
	* testsuite/ext/mt_allocator/check_deallocate_null_thread.cc: New.
	* testsuite/ext/array_allocator/check_deallocate_null.cc: New.
	* testsuite/ext/debug_allocator/check_deallocate_null.cc: New.
	* testsuite/ext/malloc_allocator/check_deallocate_null.cc: New.
	* testsuite/ext/new_allocator/check_deallocate_null.cc: New.
	* testsuite/ext/pool_allocator/check_deallocate_null.cc: New.

	* testsuite/testsuite_allocator.h (check_new): Add instance argument.
	* testsuite/ext/array_allocator/check_new.cc: New.

From-SVN: r89060
2004-10-14 23:03:26 +00:00
Benjamin Kosnik 1f042340f1 headers.cc: Add includes, compile only.
2004-10-14  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/ext/headers.cc: Add includes, compile only.
	* testsuite/ext/hash_map.cc: Move to...
	* testsuite/ext/hash_map/1.cc: ...here.
	* testsuite/ext/14648.cc: Move to...
	* testsuite/ext/hash_map/14648.cc: ...here.
	* testsuite/ext/hash_map/instantiate.cc: Add.
	* testsuite/ext/hash_set.cc: Move to...
	* testsuite/ext/hash_set/1.cc: ...here.
	* testsuite/ext/hash_set_explicit_instantiation.cc: Move to...
	* testsuite/ext/hash_set/instantiate.cc: ...here.
	* testsuite/ext/hash_check_construct_destroy.cc: Move to...
	* testsuite/ext/hash_set/check_construct_destroy.cc: ...here.
	* testsuite/ext/slist_check_construct_destroy.cc: Move to...
	* testsuite/ext/slist/check_construct_destroy.cc: ...here.
	* testsuite/ext/slist_explicit_instantiation.cc: Move to...
	* testsuite/ext/slist/instantiate.cc: ...here.

From-SVN: r89054
2004-10-14 21:34:52 +00:00
Paolo Carlini cbb0dcef12 basic_string.tcc (_S_create): Use consistently the exponential policy, simplify.
2004-10-13  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/basic_string.tcc (_S_create): Use consistently
	the exponential policy, simplify.
	* testsuite/performance/21_strings/string_append_2.cc: New.

	* include/ext/array_allocator.h (allocate): Fix bad_alloc check.
	* testsuite/ext/array_allocator/2.cc: Fix wrt 64-bit archs (in
	that case sizeof(_Rep) == 24).

From-SVN: r88972
2004-10-13 08:58:41 +00:00
Paolo Carlini a3186d4e60 [multiple changes]
2004-10-12  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/17948
	* include/bits/stl_tree.h (erase(iterator, iterator)): Revert
	wrong commit of 2004-10-07.

2004-10-12  Scott Snyder  <snyder@fnal.gov>

	PR libstdc++/17948
	* testsuite/23_containers/set/modifiers/17948.cc: New.

From-SVN: r88956
2004-10-13 00:11:14 +00:00
Benjamin Kosnik 5a1e5472f5 re PR libstdc++/17937 (Critical ~__pool troubles)
2004-10-11  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/stl_deque.h: Correct for over-long lines.

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

	PR libstdc++/17937
	* include/ext/mt_allocator.h (__pool::_M_destroy): New.
	* src/mt_allocator.cc (__pool::~__pool): Change definitions to
	_M_destroy.
	* acconfig.h: Remove _GLIBCXX_USE___CXA_ATEXIT.
	* acinclude.m4 (GLIBCXX_ENABLE_CXA_ATEXIT): Remove.
	* configure.ac: Remove call to GLIBCXX_ENABLE_CXA_EXIT.
	* configure: Regenerate.
	* config/linker-map.gnu: Tweak exports.
	* docs/html/ext/mt_allocator.html: Update docs.
	* testsuite/ext/mt_allocator/deallocate_global-2.cc: Fix.
	* testsuite/ext/mt_allocator/deallocate_global-4.cc: Fix.
	* testsuite/ext/mt_allocator/deallocate_global_thread-1.cc: Fix.
	* testsuite/ext/mt_allocator/deallocate_global_thread-3.cc: Fix.
	* testsuite/ext/mt_allocator/deallocate_local-2.cc: Fix.
	* testsuite/ext/mt_allocator/deallocate_local-4.cc: Fix.
	* testsuite/ext/mt_allocator/deallocate_local_thread-3.cc: Fix.
	* testsuite/ext/mt_allocator/deallocate_local_thread-1.cc: Fix.

From-SVN: r88913
2004-10-12 01:10:39 +00:00
Benjamin Kosnik 61b26514c2 PR libstdc++/16614 continued.
2004-10-11  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/16614 continued.
	* include/ext/mt_allocator.h
	(__per_type_pool_policy::_S_get_pool): Use saner defaults based on
	specific type characteristics.
	(__pool_base): Add constructor that takes a _Tune argument.
	(__pool): Same.
	* testsuite/ext/mt_allocator/tune-2.cc: Adjust default.
	* testsuite/ext/mt_allocator/tune-4.cc: Same.
	* testsuite/ext/mt_allocator/tune-3.cc: Same.

From-SVN: r88902
2004-10-11 20:26:53 +00:00
Joachim Kuebart e55096f0ce pool_allocator.cc (__pool_alloc_base::_M_allocate_chunk): Deal properly with exceptions thrown by ::operator new(size_t).
2004-10-11  Joachim Kuebart  <kuebart@mathematik.uni-ulm.de>
	    Paolo Carlini  <pcarlini@suse.de>

	* src/pool_allocator.cc (__pool_alloc_base::_M_allocate_chunk):
	Deal properly with exceptions thrown by ::operator new(size_t).
	* testsuite/ext/pool_allocator/allocate_chunk.cc: New.

	* include/ext/pool_allocator.h: Include <cstdlib>.

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

From-SVN: r88872
2004-10-11 08:19:35 +00:00
Paolo Carlini a780ad2f43 monetary_members.cc (_S_construct_pattern): Give __ret a default value, thus avoiding spurious warnings.
2004-10-10  Paolo Carlini  <pcarlini@suse.de>

	* config/locale/gnu/monetary_members.cc (_S_construct_pattern):
	Give __ret a default value, thus avoiding spurious warnings.

	* testsuite/performance/27_io/filebuf_sgetn_unbuf.cc: Open either
	words or linux.words, otherwise exit.
	* testsuite/performance/27_io/ifstream_getline.cc: Slighlty tweak.

From-SVN: r88848
2004-10-10 17:55:23 +00:00
Paolo Carlini dafa8871d1 std_memory.h (__get_temporary_buffer): Don't use INT_MAX...
2004-10-09  Paolo Carlini  <pcarlini@suse.de>

	* include/std/std_memory.h (__get_temporary_buffer): Don't use
	INT_MAX, prefer numeric_limits<ptrdiff_t>::max(), ok on 64-bit
	platforms too.
	* testsuite/20_util/memory/auto_ptr/assign_neg.cc: Adjust dg-error
	line numbers.

From-SVN: r88814
2004-10-09 08:23:02 +00:00
Benjamin Kosnik c3e7f18406 acconfig.h: Add _GLIBCXX_USE___CXA_ATEXIT.
2004-10-08  Benjamin Kosnik  <bkoz@redhat.com>

	* acconfig.h: Add _GLIBCXX_USE___CXA_ATEXIT.
	* acinclude.m4 (GLIBCXX_ENABLE_CXA_ATEXIT): New.
	* configure.ac: Call GLIBCXX_ENABLE_CXA_EXIT.
	* configure: Regenerate.
	* src/mt_allocator.cc (__pool::~__pool): Make conditional on
	_GLIBCXX_USE___CXA_ATEXIT macro.
	* docs/html/ext/mt_allocator.html: Add note about deallocation.
	* testsuite/ext/mt_allocator/deallocate_local-2.cc: Guard checks
	with _GLIBCXX_USE___CXA_ATEXIT.
	* testsuite/ext/mt_allocator/deallocate_global_thread-3.cc: Same.
	* testsuite/ext/mt_allocator/deallocate_global_thread-1.cc: Same.
	* testsuite/ext/mt_allocator/deallocate_global-4.cc: Same.
	* testsuite/ext/mt_allocator/deallocate_global-2.cc: Same.
	* testsuite/ext/mt_allocator/deallocate_local_thread-3.cc: Same.
	* testsuite/ext/mt_allocator/deallocate_local_thread-1.cc: Same.
	* testsuite/ext/mt_allocator/deallocate_local-4.cc: Same.

From-SVN: r88809
2004-10-09 02:30:10 +00:00
Phil Edwards ebd9dfc96d libstdc++.exp: Update list of undefined functions.
2004-10-07  Phil Edwards  <phil@codesourcery.com>

	* testsuite/lib/libstdc++.exp:  Update list of undefined functions.

From-SVN: r88716
2004-10-07 23:20:42 +00:00
Benjamin Kosnik 3febde356c tr1: New.
2004-10-07  Benjamin Kosnik  <bkoz@redhat.com>

	* include/tr1: New.
	* include/tr1/array: New.
	* include/Makefile.am (tr1_headers): New.
	(stamp-tr1): New.
	(install-headers): New.
	(allstamped): Add stamp-tr1.

	* include/ext/array_allocator.h: New.
	* include/Makefile.am: Add.
	* include/Makefile.in: Regenerate.
	* testsuite/ext/array_allocator/1.cc: New.
	* testsuite/ext/array_allocator/2.cc: New.

From-SVN: r88711
2004-10-07 22:06:23 +00:00
Richard Earnshaw 446e877825 * testsuite/lib/libstdc++.exp (libstdc++_exit): New proc.
From-SVN: r88710
2004-10-07 22:00:29 +00:00
Benjamin Kosnik e3f78d9b11 acinclude.m4 (GLIBCXX_ENABLE_THREADS): Set enable_thread.
2004-10-06  Benjamin Kosnik  <bkoz@redhat.com>

	* acinclude.m4 (GLIBCXX_ENABLE_THREADS): Set enable_thread.
	(GLIBCXX_CONFIGURE_TESTSUITE): Use it.
	* configure: Regenerated.
	* testsuite/Makefile.am (CLEANFILES): Add TEST for
	check-performance executables.
	(stamp_thread): New.
	(all-local): Use it.
	* testsuite/Makefile.in: Regenerate.
	* scripts/create_testsuite_files: Filter thread tests.

	* testsuite/thread/pthread1.cc: Remove macro conditionals: this
	file will only be run by thread enabled configurations.
	* testsuite/thread/pthread7-rope.cc: Same, add rope_type typedef.
	* testsuite/thread/pthread6.cc: Same.
	* testsuite/thread/pthread5.cc: Same.
	* testsuite/thread/pthread4.cc: Same.
	* testsuite/thread/pthread3.cc: Same.
	* testsuite/thread/pthread2.cc: Same.

	* testsuite/ext/mt_allocator/instantiate.cc: Add in __GTHREADS guard.
	* testsuite/ext/mt_allocator/deallocate_global-1.cc: Move to...
	* testsuite/ext/mt_allocator/deallocate_global_thread-1.cc: ...here.
	* testsuite/ext/mt_allocator/deallocate_global-3.cc: Move to...
	* testsuite/ext/mt_allocator/deallocate_global_thread-3.cc: ...here.
	* testsuite/ext/mt_allocator/deallocate_local-1.cc: Move to...
	* testsuite/ext/mt_allocator/deallocate_local_thread-1.cc: ...here.
	* testsuite/ext/mt_allocator/deallocate_local-3.cc: Move to...
	* testsuite/ext/mt_allocator/deallocate_local_thread-3.cc: ...here.

From-SVN: r88628
2004-10-06 22:12:34 +00:00
Paolo Carlini dbb8bfe8c5 [multiple changes]
2004-10-06  Paolo Carlini  <pcarlini@suse.de>

	* include/std/std_sstream.h (_M_sync): When the caller is
	setbuf, don't trust _M_string.capacity() to be the size of
	the buffer area, use _M_string.size() in this case.
	* testsuite/27_io/basic_stringbuf/setbuf/char/4.cc: New.
	* testsuite/27_io/basic_stringbuf/setbuf/wchar_t/4.cc: Likewise.

	* include/bits/sstream.tcc (overflow): Avoid calling string::assign
	unnecessarily when the current _M_string is empty.

2004-10-06  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/stl_algo.h (__reverse(bidirectional_iterator_tag)):
	Avoid iterator postincrement.
	(__rotate): Likewise.

	* include/bits/stl_algo.h: Minor formatting tweaks.

2004-10-06  Christopher Jefferson <caj@cs.york.ac.uk>

	* include/bits/stl_algo.h (__reverse(random_access_iterator_tag)):
	Avoid iterator postincrement; fix swapping middle element with
	itself on odd-length inputs.

From-SVN: r88593
2004-10-06 09:06:59 +00:00
Benjamin Kosnik 12cde21b12 re PR libstdc++/17780 (std::allocator vs. static init)
2004-10-05  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/17780
	* include/ext/mt_allocator.h (__pool_base::_Tune): Add default
	options as compile-time constant enums.
	(__pool_base::_Tune::is_default): New.
	(__pool_base::_Block_address): New.
	(__pool_base): Rearrange data members.
	(__pool::_M_reserve_memory): To _M_reserve_block.
	(__pool::_M_reclaim_memory): To _M_reclaim_block.
	(__pool::_Bin_record): Add _Block_address data member.
	(__pool<false>): Add _M_thread_freelist_initial.
	(__pool::~__pool): Declare.
	(__common_pool_policy): Move static data member to...
	(__common_pool_policy::_S_get_pool): ...here, make static local.
	(__per_type_pool_policy): Move static data member to...
	(__per_type_pool_policy::_S_get_pool): ...here, make static local.
	(__mt_alloc::__mt_alloc): Call __policy_type::_S_get_pool.
	Remove static member definitions. Use define for __default_policy.
	* src/mt_allocator.cc: Same.
	* config/linker-map.gnu: Don't export _S_get_pool. Renames.
	* testsuite/ext/new_allocator: New.
	* testsuite/ext/new_allocator/instantiate.cc: New.
	* testsuite/ext/new_allocator/check_new.cc: New.
	* testsuite/ext/new_allocator/deallocate_global.cc: New.
	* testsuite/ext/new_allocator/deallocate_local.cc: New.
	* testsuite/ext/mt_allocator/instantiate.cc: Instantiate all
	template arguments.
	* testsuite/ext/mt_allocator/deallocate_global-1.cc: New.
	* testsuite/ext/mt_allocator/deallocate_global-2.cc: New.
	* testsuite/ext/mt_allocator/deallocate_global-3.cc: New.
	* testsuite/ext/mt_allocator/deallocate_global-4.cc: New.
	* testsuite/ext/mt_allocator/deallocate_local-1.cc: New.
	* testsuite/ext/mt_allocator/deallocate_local-2.cc: New.
	* testsuite/ext/mt_allocator/deallocate_local-3.cc: New.
	* testsuite/ext/mt_allocator/deallocate_local-4.cc: New.
	* testsuite/ext/mt_allocator/deallocate.cc: New.
	* testsuite/ext/malloc_allocator/deallocate.cc: New.
	* testsuite/ext/malloc_allocator/deallocate_global.cc: New.
	* testsuite/ext/malloc_allocator/deallocate_local.cc: New.

From-SVN: r88589
2004-10-06 04:22:42 +00:00
Benjamin Kosnik 0e98ac6223 configure.ac (libtool_VERSION): To 6:3:0.
2004-10-04  Benjamin Kosnik  <bkoz@redhat.com>

	* configure.ac (libtool_VERSION): To 6:3:0.
	* configure: Regnerate.
	* testsuite/testsuite_abi.cc (check_version): Add 3.4.3.

From-SVN: r88545
2004-10-05 05:02:58 +00:00
Paolo Carlini abccc4f66c sstream.tcc (pbackfail): Implement correctly 27.7.1.3/2, bullet 2...
2004-10-01  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/sstream.tcc (pbackfail): Implement correctly
	27.7.1.3/2, bullet 2: if mode & ios_base::out is false do not
	write in the buffer.
	* testsuite/27_io/basic_stringbuf/pbackfail/char/1.cc: New.
	* testsuite/27_io/basic_stringbuf/pbackfail/char/2.cc: Likewise.
	* testsuite/27_io/basic_stringbuf/pbackfail/wchar_t/1.cc: Likewise.
	* testsuite/27_io/basic_stringbuf/pbackfail/wchar_t/2.cc: Likewise.
	* testsuite/27_io/basic_istream/putback/char/1.cc: Tweak consistently.

From-SVN: r88407
2004-10-01 21:01:29 +00:00
Paolo Carlini 9c9e97bdb4 PR libstdc++/10975 (DR 453)
2004-09-30  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/10975 (DR 453)
	* include/bits/sstream.tcc (seekoff): Don't fail if __beg == 0
	and __off == 0.
	* docs/html/ext/howto.html: Add an entry for DR 453.
	* testsuite/27_io/basic_stringbuf/seekoff/char/10975.cc: New.
	* testsuite/27_io/basic_stringbuf/seekoff/wchar_t/10975.cc: Likewise.
	* testsuite/27_io/basic_istream/tellg/char/1.cc: Tweak consistently.
	* testsuite/27_io/basic_ostream/tellp/char/1.cc: Likewise.
	* testsuite/27_io/basic_ostream/tellp/char/2.cc: Likewise.
	* testsuite/27_io/basic_istream/seekg/char/2346-fstream.cc: Fix and
	move to...
	* testsuite/27_io/basic_istream/seekp/char/2346-fstream.cc: ... here.
	* testsuite/27_io/basic_istream/seekg/char/2346-sstream.cc: Fix and
	move to...
	* testsuite/27_io/basic_istream/seekp/char/2346-sstream.cc: ... here.

From-SVN: r88341
2004-09-30 17:23:10 +00:00
Paolo Carlini 983de0da66 std_sstream.h (basic_stringbuf(ios_base::openmode)): Don't use _M_stringbuf_init, keep the pointers null, per 27.7.1.1.
2004-09-29  Paolo Carlini  <pcarlini@suse.de>

	* include/std/std_sstream.h (basic_stringbuf(ios_base::openmode)):
	Don't use _M_stringbuf_init, keep the pointers null, per 27.7.1.1.
	(str()): Slightly tweak, protect from pptr() == 0.
	(_M_update_egptr()): Likewise.
	* include/bits/sstream.tcc (ssekoff, seekpos): In order to check
	for an empty buffer use __beg instead of _M_string.capacity().
	* testsuite/27_io/basic_stringbuf/cons/char/1.cc: New.
	* testsuite/27_io/basic_stringbuf/cons/wchar_t/1.cc: Likewise.

	* testsuite/27_io/basic_filebuf/cons/char/1.cc: New.
	* testsuite/27_io/basic_filebuf/cons/wchar_t/1.cc: Likewise.
	* testsuite/27_io/basic_streambuf/cons/char/1.cc: Update.
	* testsuite/27_io/basic_streambuf/cons/wchar_t/1.cc: Likewise.

2004-09-29  Paolo Carlini  <pcarlini@suse.de>
	    Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/testsuite_io.h (class constraint_buf): New, extended
	and templatized version of constraint_filebuf; add typedefs for
	streambuf/stringbuf/filebuf and wchar_t counterparts.

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

From-SVN: r88307
2004-09-29 21:14:43 +00:00
Paolo Carlini 1165dc50e8 [multiple changes]
2004-09-28  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/16612
	* include/bits/basic_string.h (_M_dispose, _M_refcopy,
	basic_string()): When _GLIBCXX_FULLY_DYNAMIC_STRING is defined,
	don't deal with _S_empty_rep.
	* include/bits/basic_string.tcc (_S_construct, _M_destroy,
	_M_leak_hard, _M_mutate): Likewise.
	* acinclude.m4 (GLIBCXX_ENABLE_FULLY_DYNAMIC_STRING): New.
	* acconfig.h: Add corresponding undef.
	* configure.ac: Use GLIBCXX_ENABLE_FULLY_DYNAMIC_STRING.
	* docs/html/configopts.html: Document --enable-fully-dynamic-string.
	* configure: Regenerate.
	* config.h.in: Likewise.

2004-09-28  Benjamin Kosnik  <bkoz@redhat.com>
            Paolo Carlini  <pcarlini@suse.de>

	* testsuite/21_strings/basic_string/operations/char/1.cc: New.
	* testsuite/21_strings/basic_string/operations/wchar_t/1.cc: New.
	* testsuite/21_strings/basic_string/element_access/char/empty.cc: New.
	* testsuite/21_strings/basic_string/element_access/wchar_t/empty.cc:
	New.

2004-09-28  Paolo Carlini  <pcarlini@suse.de>

	* README: Remove obsolete entry about include/c_shadow.

From-SVN: r88225
2004-09-28 08:58:35 +00:00
H.J. Lu c03c696f6b re PR libstdc++/17469 (Testsuite in libstdc++ overrides LD_LIBRARY_PATH)
2004-09-24  H.J. Lu  <hongjiu.lu@intel.com>

	PR libstdc++/17469
	* testsuite/lib/libstdc++.exp: Don't use global ld_library_path.

From-SVN: r88054
2004-09-24 09:51:09 -07:00
Paul Brook 049930c8dd 1-in.cc: XFAIL more arm simulator targets.
* testsuite/27_io/basic_filebuf/sgetn/char/1-in.cc: XFAIL more arm
	simulator targets.
	* testsuite/27_io/basic_filebuf/sgetn/char/1-io.cc: Ditto.
	* testsuite/27_io/basic_filebuf/sgetn/char/2-in.cc: Ditto.
	* testsuite/27_io/basic_filebuf/sgetn/char/2-io.cc: Ditto.
	* testsuite/27_io/basic_istream/readsome/char/6746-2.cc: Ditto.
	* testsuite/ext/stdio_filebuf/char/10063-2.cc: Ditto.
	* testsuite/ext/stdio_filebuf/char/10063-3.cc: Ditto.

From-SVN: r88003
2004-09-24 02:04:39 +00:00
Zack Weinberg 2cfe82fe43 decl.c (grokfndecl): If ::main is found not to return int, correct it after issuing a diagnostic.
gcc/cp:
	* decl.c (grokfndecl): If ::main is found not to return int,
	correct it after issuing a diagnostic.
	(grokdeclarator): If the incoming type was error_mark_node, do
	not complain about declaring something with no type.
	(start_function): Change check for ::main not returning int to
	an assertion, as grokfndecl now catches this when the user did it.
	* init.c (perform_member_init, sort_mem_initializers)
	(emit_mem_initializers): Make most diagnostics be issued on
	the line of current_function_decl, not whatever the current
	input line is.
	* parser.c (cp_lexer_peek_token_emit_debug_info): Surround
	definition and declaration with #ifdef ENABLE_CHECKING.
	Avoid unnecessary use of fprintf.
	(cp_lexer_print_token, cp_lexer_debug_stream): Adjust stub
	definitions to avoid warnings.
	(cp_lexer_new_main): Add assertion that first token is not a
	padding token.
	(cp_lexer_new_from_token_array): Fold into ...
	(cp_lexer_new_from_tokens): ... here.  Add assertion that
	first token is not a padding token.
	(cp_lexer_set_source_position_from_token): Move nearer to callers.
	Remove unused lexer argument.
	(cp_lexer_peek_token): Just print debugging report (if enabled)
	and return lexer->next_token.
	(cp_lexer_skip_purged_tokens): Delete.
	(cp_lexer_next_token_is, cp_lexer_next_token_is_not): Make
	inline, simplify bodies.
	(cp_lexer_peek_nth_token): Add debugging report a la
	cp_lexer_peek_token.
	(cp_lexer_consume_token): Correct commentary.  Advance over
	purged tokens here.  Set current source position here, from
	token to be returned.  Avoid unnecessary use of fprintf.
	(cp_lexer_purge_token): Advance next_token pointer over this and
	subsequent purged tokens.
	(cp_parser_error): Adjust source position to that of the
	peeked token.
	(cp_parser_push_lexer_for_tokens, cp_parser_pop_lexer): New functions.
	(cp_parser_string_literal): Remove some excessive cleverness.
	(cp_parser_enum_specifier): Call start_enum before consuming
	the opening brace.
	(cp_parser_member_declaration): Make the "extra semicolon"
	diagnostic consistently-worded with the other place this is
	diagnosed.  Explicitly set the diagnostic location to the
	location of the offending semicolon.
	(cp_parser_enclosed_template_argument_list): Use %</%> quoting
	in diagnostics.  Do not use cp_parser_require.  Set location
	of diagnostics about improper use of '>>' to location of
	offending token.
	(cp_parser_late_parsing_for_member):
	Use cp_parser_push_lexer_for_tokens and cp_parser_pop_lexer.
	(cp_parser_late_parsing_default_args): Likewise.  Manually
	move some logic outside the loop.

gcc/testsuite:
	* g++.dg/ext/complit1.C
	* g++.dg/other/error2.C
	* g++.dg/other/nontype-1.C
	* g++.dg/parse/crash11.C
	* g++.dg/parse/crash12.C
	* g++.dg/parse/error15.C
	* g++.dg/parse/error4.C
	* g++.dg/parse/tmpl-outside1.C
	* g++.dg/parse/too-many-tmpl-args1.C
	* g++.dg/template/dependent-expr3.C
	* g++.dg/template/error10.C
	* g++.dg/template/instantiate1.C
	* g++.dg/template/vtable2.C
	* g++.dg/warn/Wshadow-1.C
	* g++.dg/warn/weak1.C
	* g++.old-deja/g++.brendan/crash16.C
	* g++.old-deja/g++.brendan/crash18.C
	* g++.old-deja/g++.brendan/crash48.C
	* g++.old-deja/g++.brendan/crash49.C
	* g++.old-deja/g++.brendan/crash55.C
	* g++.old-deja/g++.brendan/crash56.C
	* g++.old-deja/g++.brendan/crash8.C
	* g++.old-deja/g++.brendan/enum11.C
	* g++.old-deja/g++.brendan/enum8.C
	* g++.old-deja/g++.brendan/enum9.C
	* g++.old-deja/g++.brendan/friend3.C
	* g++.old-deja/g++.brendan/misc14.C
	* g++.old-deja/g++.bugs/900402_02.C
	* g++.old-deja/g++.bugs/900404_03.C
	* g++.old-deja/g++.bugs/900404_04.C
	* g++.old-deja/g++.bugs/900428_03.C
	* g++.old-deja/g++.jason/crash4.C
	* g++.old-deja/g++.jason/overload21.C
	* g++.old-deja/g++.jason/redecl1.C
	* g++.old-deja/g++.jason/report.C
	* g++.old-deja/g++.jason/rfg10.C
	* g++.old-deja/g++.jason/template30.C
	* g++.old-deja/g++.law/arm12.C
	* g++.old-deja/g++.law/ctors5.C
	* g++.old-deja/g++.law/cvt20.C
	* g++.old-deja/g++.law/init10.C
	* g++.old-deja/g++.law/init8.C
	* g++.old-deja/g++.law/visibility17.C
	* g++.old-deja/g++.law/visibility7.C
	* g++.old-deja/g++.mike/net8.C
	* g++.old-deja/g++.mike/p646.C
	* g++.old-deja/g++.mike/p700.C
	* g++.old-deja/g++.mike/p701.C
	* g++.old-deja/g++.mike/p811.C
	* g++.old-deja/g++.ns/template13.C
	* g++.old-deja/g++.other/array3.C
	* g++.old-deja/g++.other/crash25.C
	* g++.old-deja/g++.other/dtor3.C
	* g++.old-deja/g++.other/dtor4.C
	* g++.old-deja/g++.other/main1.C
	* g++.old-deja/g++.other/warn7.C
	* g++.old-deja/g++.pt/crash11.C
	* g++.old-deja/g++.pt/crash36.C
	* g++.old-deja/g++.pt/spec22.C
	* g++.old-deja/g++.pt/spec9.C
	* g++.old-deja/g++.pt/ttp52.C
	* g++.old-deja/g++.robertl/eb103.C
	* g++.old-deja/g++.robertl/eb121.C
	* g++.old-deja/g++.robertl/eb22.C
	* g++.old-deja/g++.robertl/eb8.C:
	Update locations and/or regexps of dg-error markers.
	Remove markers for some bogus messages that are no longer issued.

libstdc++-v3:
	* testsuite/20_util/memory/auto_ptr/assign_neg.cc
	* testsuite/23_containers/map/operators/1_neg.cc
	* testsuite/23_containers/set/operators/1_neg.cc:
	Update locations and/or regexps of dg-error markers.

From-SVN: r87985
2004-09-23 21:27:25 +00:00
Paolo Carlini 3641bd5534 tune-1.cc: Use VERIFY, clean up a bit.
2004-09-17  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/ext/mt_allocator/tune-1.cc: Use VERIFY, clean
	up a bit.
	* testsuite/ext/mt_allocator/tune-2.cc: Likewise.
	* testsuite/ext/mt_allocator/tune-3.cc: Likewise.
	* testsuite/ext/mt_allocator/tune-4.cc: Likewise.

From-SVN: r87638
2004-09-17 11:18:27 +00:00
Paolo Carlini c56e3d82fc re PR libstdc++/11722 ([3.4 only] Unbuffered filebuf::sgetn is slow)
2004-09-13  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/11722
	* include/std/std_fstream.h (xsgetn): Declare only.
	* include/bits/fstream.tcc (xsgetn): Define, optimize for the
	always_noconv() case: when __n > __buflen, copy the available
	buffer and issue a direct read.
	* testsuite/performance/27_io/filebuf_sgetn_unbuf.cc: New.

	* include/bits/fstream.tcc (xsputn): Minor tweak, reorder a
	conditional.

From-SVN: r87453
2004-09-13 22:21:34 +00:00
Hans-Peter Nilsson 90c609e51a libstdc++.exp: Use gcc wrapper.exp and call libstdc++_maybe_build_wrapper instead of using...
* testsuite/lib/libstdc++.exp: Use gcc wrapper.exp and call
	libstdc++_maybe_build_wrapper instead of using local code.

From-SVN: r87452
2004-09-13 22:03:02 +00:00
Benjamin Kosnik 8bfd0a46ea re PR libstdc++/16614 (Excessive resource usage in __mt_alloc)
2004-09-01  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/16614
	* include/ext/mt_allocator.h (__mt_base): Not type dependent,
	split into..
	(__pool): New, specialize.
	(__common_pool): New, static bits here.
	(__per_type_pool): New, and here.
	(__mt_alloc_base): New.
	(__mt_alloc): Add template parameter, inherit from it.
	* src/allocator.cc: Split this...
	* src/allocator-inst.cc: And this...
	* src/pool_allocator.cc: ...into this.
	* src/mt_allocator.cc: ... and this. Add definitions for
	__mt_base.
	* src/Makefile.am (sources): Split allocator.cc to
	pool_allocator.cc and mt_allocator.cc.
	* src/Makefile.in: Regenerate.
	* config/linker-map.gnu: Add symbols.
	* docs/html/ext/mt_allocator.html: Document new design.
	* testsuite/ext/mt_allocator/tune-1.cc: New.
	* testsuite/ext/mt_allocator/tune-2.cc: New.
	* testsuite/ext/mt_allocator/tune-3.cc: New.
	* testsuite/ext/mt_allocator/tune-4.cc: New.

	* testsuite/testsuite_allocator.h (__gnu_test::check_new): New.
	* testsuite/ext/allocators.cc: Use check_new, split into...
	* testsuite/ext/mt_allocator/check_new.cc: this.
	* testsuite/ext/pool_allocator/check_new.cc: this.
	* testsuite/ext/malloc_allocator/check_new.cc: this.
	* testsuite/ext/debug_allocator/check_new.cc: this.
	* testsuite/ext/mt_allocator/instantiate.cc: this.
	* testsuite/ext/pool_allocator/instantiate.cc: this.
	* testsuite/ext/malloc_allocator/instantiate.cc: this.
	* testsuite/ext/debug_allocator/instantiate.cc: this.

From-SVN: r86936
2004-09-01 22:17:00 +00:00
Paolo Carlini b8d65dace7 locale_facets.tcc (time_get<>::_M_extract_via_format, case 'S'): Allow for at least one leap-second (as per C99...
2004-08-29  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (time_get<>::_M_extract_via_format,
	case 'S'): Allow for at least one leap-second (as per C99, 7.23.1
	and 7.23.3.5), two if !_GLIBCXX_USE_C99.
	* testsuite/22_locale/time_get/get_time/char/4.cc: New.
	* testsuite/22_locale/time_get/get_time/wchar_t/4.cc: Likewise.

From-SVN: r86712
2004-08-29 09:04:33 +00:00
Paolo Carlini 0be27b59bc 1.cc: New.
2004-08-27  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/27_io/manipulators/adjustfield/wchar_t/1.cc: New.
	* testsuite/27_io/manipulators/adjustfield/wchar_t/2.cc: Likewise.
	* testsuite/27_io/manipulators/basefield/wchar_t/1.cc: Likewise.
	* testsuite/27_io/manipulators/standard/wchar_t/1.cc: Likewise.
	* testsuite/27_io/manipulators/standard/wchar_t/2.cc: Likewise.

	* testsuite/27_io/manipulators/adjustfield/char/1.cc: Minor
	formatting fixes.
	* testsuite/27_io/manipulators/adjustfield/char/2.cc: Likewise.
	* testsuite/27_io/manipulators/basefield/char/1.cc: Likewise.
	* testsuite/27_io/manipulators/standard/char/1.cc: Likewise.
	* testsuite/27_io/manipulators/standard/char/2.cc: Likewise.

From-SVN: r86661
2004-08-27 14:45:47 +00:00
Paolo Carlini cb79308987 PR libstdc++/17038 (partial)
2004-08-25  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/17038 (partial)
	* include/bits/locale_facets.tcc (time_put<>::do_put): Increase
	__maxlen to 128.
	* include/bits/locale_facets.h (class __timepunct): Add FIXME
	comment about _M_put.
	* config/locale/generic/time_members.cc (_M_put): Always null
	terminate __s.
	* config/locale/gnu/time_members.cc (_M_put): Likewise.
	* testsuite/22_locale/time_put/put/char/17038.cc: New.
	* testsuite/22_locale/time_put/put/wchar_t/17038.cc: New.

From-SVN: r86586
2004-08-25 23:38:29 +00:00
Paolo Carlini a1a28bb582 2832.cc: New.
2004-08-24  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/27_io/basic_istringstream/rdbuf/wchar_t/2832.cc: New.
	* testsuite/27_io/basic_istringstream/str/wchar_t/1.cc: Likewise.
	* testsuite/27_io/basic_ostringstream/cons/wchar_t/3.cc: Likewise.
	* testsuite/27_io/basic_ostringstream/rdbuf/wchar_t/2832.cc: Likewise.
	* testsuite/27_io/basic_ostringstream/str/wchar_t/1.cc: Likewise.
	* testsuite/27_io/basic_ostringstream/str/wchar_t/2.cc: Likewise.

	* testsuite/27_io/basic_istringstream/rdbuf/char/2832.cc: Trim excess
	newlines.
	* testsuite/27_io/basic_istringstream/str/char/1.cc: Likewise.

From-SVN: r86481
2004-08-24 13:55:44 +00:00
Paolo Carlini a60945f82f configure.ac: Specify version 1.9.1 in AM_INIT_AUTOMAKE.
2004-08-23  Paolo Carlini  <pcarlini@suse.de>

	* configure.ac: Specify version 1.9.1 in AM_INIT_AUTOMAKE.
	* aclocal.m4: Regenerate with automake-1.9.1.
	* configure: Regenerate.
	* Makefile.in: Likewise.
	* include/Makefile.in: Likewise.
	* libmath/Makefile.in: Likewise.
	* libsupc++/Makefile.in: Likewise.
	* po/Makefile.in: Likewise.
	* src/Makefile.in: Likewise.
	* testsuite/Makefile.in: Likewise.

From-SVN: r86423
2004-08-23 10:18:31 +00:00
Paolo Carlini 44e91562ed locale_facets.tcc (num_put<>::do_put(bool)): Cast to a signed type, long according to the resolution of DR 359.
2004-08-22  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (num_put<>::do_put(bool)): Cast
	to a signed type, long according to the resolution of DR 359.
	* testsuite/22_locale/num_put/put/char/9.cc: New.
	* testsuite/22_locale/num_put/put/wchar_t/9.cc: New.

	* include/bits/locale_facets.tcc (num_put<>::do_put(const void*)):
	Simplify a bit: no need to clear showpos.

From-SVN: r86382
2004-08-22 17:55:51 +00:00
Paolo Carlini 82507bc996 1.cc: Use proper wchar_t type for the fill argument; minor formatting tweaks.
2004-08-21  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/22_locale/money_put/put/wchar_t/1.cc: Use proper
	wchar_t	type for the fill argument; minor formatting tweaks.
	* testsuite/22_locale/money_put/put/wchar_t/12971.cc: Likewise.
	* testsuite/22_locale/money_put/put/wchar_t/2.cc: Likewise.
	* testsuite/22_locale/money_put/put/wchar_t/3.cc: Likewise.
	* testsuite/22_locale/money_put/put/wchar_t/4.cc: Likewise.
	* testsuite/22_locale/money_put/put/wchar_t/5.cc: Likewise.
	* testsuite/22_locale/money_put/put/wchar_t/6.cc: Likewise.

From-SVN: r86362
2004-08-21 11:56:46 +00:00
Paolo Carlini 00218cb56a PR libstdc++/7219 (continued)
2004-08-20  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/7219 (continued)
	* include/bits/ios_base.h (class ios_base): Expose Annex D.6
	typedefs by default.
	* testsuite/27_io/types/1.cc: Remove #if _GLIBCXX_DEPRECATED.
	* testsuite/27_io/ios_base/cons/assign_neg.cc: Tweak dg-error
	line number.
	* testsuite/27_io/ios_base/cons/copy_neg.cc: Likewise.

From-SVN: r86340
2004-08-20 21:14:56 +00:00
Benjamin Kosnik b850582895 3.cc (test03): Don't check timezone.
2004-08-19  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/22_locale/time_put/put/char/3.cc (test03): Don't check
	timezone.
	* testsuite/22_locale/time_put/put/wchar_t/3.cc (test03): Same.

From-SVN: r86271
2004-08-19 20:47:39 +00:00
Paolo Carlini 1b90e7a391 insert.cc: For std::map instantiate the allocator for a correct pair type.
2004-08-19  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/performance/20_util/allocator/insert.cc: For std::map
	instantiate the allocator for a correct pair type.
	* testsuite/performance/20_util/allocator/insert_insert.cc: Likewise.
	* testsuite/performance/20_util/allocator/map_thread.cc: Likewise.
	* testsuite/performance/20_util/allocator/producer_consumer.cc:
	Likewise.

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

From-SVN: r86269
2004-08-19 20:22:45 +00:00
Paolo Carlini abc145a322 1.cc: Add VERIFY on the results.
2004-08-19  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/22_locale/time_put/put/char/1.cc: Add VERIFY on the
	results.
	* testsuite/22_locale/time_put/put/char/2.cc: Likewise.
	* testsuite/22_locale/time_put/put/char/3.cc: Likewise.
	* testsuite/22_locale/time_put/put/char/4.cc: Likewise.
	* testsuite/22_locale/time_put/put/wchar_t/1.cc: Likewise.
	* testsuite/22_locale/time_put/put/wchar_t/2.cc: Likewise.
	* testsuite/22_locale/time_put/put/wchar_t/3.cc: Likewise.
	* testsuite/22_locale/time_put/put/wchar_t/4.cc: Likewise.

From-SVN: r86246
2004-08-19 10:30:05 +00:00
Paolo Carlini ba43cf0b4f 2832.cc: Remove junk.
2004-08-15  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/27_io/basic_stringstream/rdbuf/char/2832.cc: Remove junk.
	* testsuite/27_io/basic_stringstream/str/char/1.cc: Likewise.
	* testsuite/27_io/basic_stringstream/str/char/3.cc: Likewise.

	* testsuite/27_io/basic_stringstream/rdbuf/wchar_t/2832.cc: New.
	* testsuite/27_io/basic_stringstream/str/wchar_t/1.cc: Likewise.
	* testsuite/27_io/basic_stringstream/str/wchar_t/2.cc: Likewise.
	* testsuite/27_io/basic_stringstream/str/wchar_t/3.cc: Likewise.
	* testsuite/27_io/basic_stringstream/str/wchar_t/4.cc: Likewise.

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

	* include/bits/deque.tcc: Trivial formatting fixes.

From-SVN: r86040
2004-08-15 23:08:58 +00:00
Paolo Carlini 23d4fa49c6 deque.tcc: Trivial formatting fixes.
2004-08-15  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/deque.tcc: Trivial formatting fixes.

	* include/bits/locale_facets.tcc (num_get<>::do_get(&bool)):
	Remove unneded typedef.

	* include/bits/locale_facets.tcc: Very minor tweaks.

	* testsuite/22_locale/time_put/put/wchar_t/1.cc: Use proper
	type for the fill argument.
	* testsuite/22_locale/time_put/put/wchar_t/10.cc: Likewise.
	* testsuite/22_locale/time_put/put/wchar_t/2.cc: Likewise.
	* testsuite/22_locale/time_put/put/wchar_t/3.cc: Likewise.
	* testsuite/22_locale/time_put/put/wchar_t/4.cc: Likewise.
	* testsuite/22_locale/time_put/put/wchar_t/5.cc: Likewise.
	* testsuite/22_locale/time_put/put/wchar_t/6.cc: Likewise.
	* testsuite/22_locale/time_put/put/wchar_t/7.cc: Likewise.
	* testsuite/22_locale/time_put/put/wchar_t/8.cc: Likewise.

From-SVN: r86026
2004-08-15 19:03:44 +00:00
Paolo Carlini 0a162bde46 re PR libstdc++/16956 ([3.4 only] std::stringbuf::seekoff return wrong position value)
2004-08-12  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/16956
	* include/bits/sstream.tcc (basic_stringbuf<>::seekoff): Add __off
	to the returned value, reorganize a bit.
	* testsuite/27_io/basic_stringbuf/seekoff/char/16956.cc: New.
	* testsuite/27_io/basic_stringbuf/seekoff/wchar_t/16956.cc: New.

	* testsuite/27_io/basic_stringbuf/seekoff/char/1.cc: Remove junk.
	* testsuite/27_io/basic_stringbuf/seekoff/wchar_t/1.cc: Likewise.
	* testsuite/27_io/basic_stringbuf/seekpos/char/1.cc: Likewise.
	* testsuite/27_io/basic_stringbuf/seekpos/wchar_t/1.cc: Likewise.

From-SVN: r85910
2004-08-12 22:26:32 +00:00
Kelley Cook 7eaf73d757 Makefile.in, [...]: Regenerate
2004-08-12  Kelley Cook  <kcook@gcc.gnu.org>

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

From-SVN: r85869
2004-08-12 11:54:13 +00:00
Paolo Carlini be23502b44 1.cc: Fix typo.
2004-08-11  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/27_io/basic_stringbuf/sbumpc/wchar_t/1.cc: Fix typo.

From-SVN: r85804
2004-08-11 14:05:47 +00:00
Paolo Carlini 665cdd2c85 1.cc: Declare test variable.
2004-08-11  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/27_io/basic_stringbuf/imbue/char/1.cc: Declare test
	variable.
	* testsuite/27_io/basic_stringbuf/imbue/wchar_t/1.cc: Ditto.
	* testsuite/27_io/basic_stringbuf/in_avail/char/1.cc: Remove junk.
	* testsuite/27_io/basic_stringbuf/in_avail/wchar_t/1.cc: Ditto.
	* testsuite/27_io/basic_stringbuf/sbumpc/char/1.cc: Ditto.
	* testsuite/27_io/basic_stringbuf/sbumpc/wchar_t/1.cc: Ditto.
	* testsuite/27_io/basic_stringbuf/setbuf/char/1.cc: Ditto.
	* testsuite/27_io/basic_stringbuf/setbuf/wchar_t/1.cc: Ditto.
	* testsuite/27_io/basic_stringbuf/sgetc/char/1.cc: Ditto.
	* testsuite/27_io/basic_stringbuf/sgetc/wchar_t/1.cc: Ditto.
	* testsuite/27_io/basic_stringbuf/sgetn/char/1.cc: Ditto.
	* testsuite/27_io/basic_stringbuf/sgetn/wchar_t/1.cc: Ditto.
	* testsuite/27_io/basic_stringbuf/snextc/char/1.cc: Ditto.
	* testsuite/27_io/basic_stringbuf/snextc/wchar_t/1.cc: Ditto.
	* testsuite/27_io/basic_stringbuf/sputbackc/char/1.cc: Ditto.
	* testsuite/27_io/basic_stringbuf/sputbackc/wchar_t/1.cc: Ditto.
	* testsuite/27_io/basic_stringbuf/sputc/char/1.cc: Ditto.
	* testsuite/27_io/basic_stringbuf/sputc/wchar_t/1.cc: Ditto.
	* testsuite/27_io/basic_stringbuf/sputn/char/1.cc: Ditto.
	* testsuite/27_io/basic_stringbuf/sputn/wchar_t/1.cc: Ditto.
	* testsuite/27_io/basic_stringbuf/sungetc/char/1.cc: Ditto.
	* testsuite/27_io/basic_stringbuf/sungetc/wchar_t/1.cc: Ditto.

From-SVN: r85802
2004-08-11 13:47:24 +00:00
Paolo Carlini 48dd95f2a4 re PR libstdc++/16959 (Segmentation fault in ios_base::sync_with_stdio)
2004-08-11  Paolo Carlini  <pcarlini@suse.de>
	    Petur Runolfsson  <peturr02@ru.is>

	PR libstdc++/16959
	* src/ios_init.cc (ios_base::sync_with_stdio): Make sure the
	standard streams are constructed.
	* testsuite/27_io/ios_base/sync_with_stdio/16959.cc: New.

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

From-SVN: r85797
2004-08-11 09:31:13 +00:00
Mark Mitchell 4c24b21a47 Makefile.am (hosted_source): Add libmath and testsuite.
* Makefile.am (hosted_source): Add libmath and testsuite.
	(SUBDIRS): Remove them.
	* acinclude.m4: (GLIBCXX_ENABLED_HOSTED): Default to freestanding
	on arm*-*-symbianelf*.
	* crossconfig.m4: Add arm*-*-symbianelf* support.
	* include/c_std/std/std_cstdlib.h (stdlib.h): Do not include it
	when freestanding.  Do not bring names into std:: namespace with
	"using" when freestanding.  Declare required functions and macros
	when freestanding.
	* libsupc++/Makefile.am (c_sources): Do not include cp-demangle.c
	when freestanding.
	* libsupc++/del_op.cc: Declare "free" only when freestanding.
	* libsupc++/eh_alloc.cc (cstring): Include it only when hosted.
	(malloc): Declare when freestanding.
	(free): Likewise.
	(memset): Likewise.
	(__cxa_allocate_exception): Call malloc, not std::malloc.  Likewise
	for memset.
	(__cxa_free_exception): Likewise for free.
	* libsupc++/new_op.cc: Declare "malloc" when freestanding.
	* libsupc++/pure.cc (writestr): Define to nothing when
	freestanding.
	* libsupc++/vterminate.cc: Do not define anything when
	freestanding.
	* Makefile.in: Regenerated.
	* aclocal.m4: Likewise.
	* configure: Likewise.
	* include/Makefile.in: Likewise.
	* libmath/Makefile.in: Likewise.
	* libsupc++/Makefile.in: Likewise.
	* po/Makefile.in: Likewise.
	* src/Makefile.in: Likewise.
	* testsuite/Makefile.in: Likewise.

From-SVN: r85452
2004-08-02 20:28:22 +00:00
Matt Austern f1197ae160 re PR libstdc++/16844 (Explicit instantiation failing)
PR libstdc++/16844
	* include/bits/stl_list.h (_M_create_node): Remove unused
	zero-argument version.
	* include/ext/slist (_M_create_node): Pass two arguments to
	allocator's construct() member function.
	* testsuite/23_containers/deque/explicit_instantiation.cc: New.
	* testsuite/23_containers/list/explicit_instantiation.cc: New.
	* testsuite/23_containers/vector/explicit_instantiation.cc: New.
	* testsuite/23_containers/map/explicit_instantiation.cc: New.
	* testsuite/23_containers/set/explicit_instantiation.cc: New.
	* testsuite/23_containers/multimap/explicit_instantiation.cc: New.
	* testsuite/23_containers/multiset/explicit_instantiation.cc: New.
	* testsuite/ext/hash_set_explicit_instantiation.cc: New.
	* testsuite/ext/slist_explicit_instantiation.cc: New.

From-SVN: r85428
2004-08-02 04:40:19 +00:00
Paolo Carlini 7c9b102ede re PR libstdc++/14220 ([3.5] num_put::do_put() undesired float/double behavior)
2004-07-29  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/14220
	* include/bits/locale_facets.tcc (num_put<>::_M_insert_float):
	Don't clip the precision passed down to __convert_from_v:
	22.2.2.2.2 nowhere says so.
	* testsuite/22_locale/num_put/put/char/14220.cc: New.
	* testsuite/22_locale/num_put/put/wchar_t/14220.c: Likewise.

From-SVN: r85315
2004-07-29 22:11:04 +00:00
Paolo Carlini 5875306379 re PR libstdc++/16813 (compiler error in DEBUG version of range insertion std::map::insert)
2004-07-29  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/16813
	* include/debug/map.h (insert(_InputIterator, _InputIterator)):
	Fix typo.
	* testsuite/23_containers/map/insert/16813.cc: New.

From-SVN: r85295
2004-07-29 10:52:49 +00:00
Matt Austern 1985f1cdaa stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument.
* include/bits/stl_construct.h (_Destroy): New three-argument
	overload that takes an allocator argument.  Another inline
	three-argument overload that takes std::allocator and dispatches
	to the two-argument version.
	* include/bits/stl_uninitialized.h (__uninitialized_fill_n_aux):
	Change return type to void to match uninitialized_fill_n.
	(__uninitialized_copy_a_): New function.  Like uninitialized_copy
	except that it takes an allocator and uses it for construct and
	destroy.  If the allocator is std::allocator, dispatches to
	uninitialized_copy.
	(__uninitialized_fill_a): Likewise.
	(__uninitialized_fill_n_a): Likewise.
	(__uninitialized_copy_copy): Give it an allocator argument.
	(__uninitialized_fill_copy): Likewise.
	(__uninitialized_copy_fill): Likewise.
	* include/bits/deque.tcc: Use new forms defined in stl_construct.h
	and stl_uninitialized.h.  Replace use of single-argument _Construct
	and _Destroy with use of allocator's construct and destroy methods.
	* include/bits/list.tcc: Likewise.
	* include/bits/stl_deque.h: Likewise.
	* include/bits/stl_list.h: Likewise.
	* include/bits/stl_tree.h: Likewise.
	* include/bits/stl_vector.h: Likewise.
	* include/bits/vector.tcc: Likewise.
	* include/ext/hashtable.h: Use rebind so that allocator_type
	has correct type for a container's allocator.  Replace use of
	single-argument _Construct and _Destroy with use of allocator's
	construct and destroy methods.
	* include/ext/memory (__uninitialized_copy_n_a): New function.
	Like uninitialized_copy_n except that it takes an extra parameter,
	an allocator, and uses it for construct and destroy operations.
	* include/ext/rope: Use new forms defined in stl_construct.h,
	stl_uninitialized.h, and ext/memory.  Replace use of single-argument
	_Construct and _Destroy with allocator construct and destroy methods.
	* include/ext/ropeimpl.h: Likewise.
	* include/ext/slist.h: Likewise.
	* testsuite/testsuite_allocator.h (check_construct_destroy): New.
	* testsuite/testsuite_allocator.cc (check_construct_destroy): New.
	* testsuite/23_containers/deque/check_construct_destroy.cc: New.
	* testsuite/23_containers/list/check_construct_destroy.cc: New.
	* testsuite/23_containers/set/check_construct_destroy.cc: New.
	* testsuite/23_containers/vector/check_construct_destroy.cc: New.
	* testsuite/ext/hash_check_construct_destroy.cc: New.
	* testsuite/ext/slist_check_construct_destroy.cc: New.

From-SVN: r85265
2004-07-28 16:37:20 +00:00
Benjamin Kosnik e5ab07bb82 re PR libstdc++/15488 (possibly insufficient file permissions for executing test suite)
2004-07-19  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/15488
	* testsuite/lib/libstdc++.exp (v3-copy-files): Revert.

From-SVN: r84935
2004-07-19 23:11:03 +00:00
Paolo Carlini 368b7a304e re PR libstdc++/16505 ([3.4 only] std::uninitialized_fill_n() incorrect signature)
2004-07-14  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/16505
	* include/bits/stl_uninitialized.h (uninitialized_fill_n): Fix
	the signature to return void, as per 20.4.4.3.
	* include/bits/stl_vector.h (vector::vector(size_type,
	const value_type&, const allocator_type&), vector::vector(size_type),
	vector::_M_initialize_dispatch): Adjust callers.
	* include/bits/vector.tcc (vector<>::_M_fill_assign,
	vector<>::_M_fill_insert): Likewise.
	* testsuite/20_util/memory/16505.cc: New.

From-SVN: r84720
2004-07-14 23:57:34 +00:00
Paolo Carlini 8063a3559d 12658_thread-1.cc, [...]: Use __gnu_test::try_named_locale.
2004-07-14  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/22_locale/locale/cons/12658_thread-1.cc, 12658_thread-2.cc:
	Use __gnu_test::try_named_locale.

From-SVN: r84687
2004-07-14 14:01:45 +00:00
Paolo Carlini 9a2ba7af2c 12658_thread.cc: Move/rename to 12658_thread-1.cc and xfail.
2004-07-13  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/22_locale/locale/cons/12658_thread.cc: Move/rename
	to 12658_thread-1.cc and xfail.
	* testsuite/22_locale/locale/cons/12658_thread-2.c: New, much
	simpler version of 12658_thread-1.cc, still failing on 3_3 and
	not failing on 3_4/mainline - both on single processor and
	multiprocessor machines.

From-SVN: r84610
2004-07-13 09:08:21 +00:00
Paolo Carlini 6f4229658a Add wchar_t counterparts of the basic_streambbuf<char> tests.
2004-07-11  Paolo Carlini  <pcarlini@suse.de>

	Add wchar_t counterparts of the basic_streambbuf<char> tests.
	* testsuite/27_io/basic_streambuf/cons/wchar_t/1.cc: New.
	* testsuite/27_io/basic_streambuf/imbue/wchar_t/1.cc, 9322.cc:
	Likewise.
	* testsuite/27_io/basic_streambuf/in_avail/wchar_t/9701-3.cc: Likewise.
	* testsuite/27_io/basic_streambuf/overflow/wchar_t/1.cc, 2.cc,
	3599.cc: Likewise.
	* testsuite/27_io/basic_streambuf/sgetc/wchar_t/1.cc: Likewise.
	* testsuite/27_io/basic_streambuf/sgetn/wchar_t/1.cc: Likewise.
	* testsuite/27_io/basic_streambuf/sputbackc/wchar_t/9538.cc: Likewise.
	* testsuite/27_io/basic_streambuf/sputc/wchar_t/1057.cc: Likewise.
	* testsuite/27_io/basic_streambuf/sputn/wchar_t/1.cc, 1057.cc:
	Likewise.
	* testsuite/27_io/basic_streambuf/sync/wchar_t/1057.cc: Likewise.

	* testsuite/27_io/basic_streambuf/imbue/char/1.cc, 9322.cc: Minor
	tweaks.
	* testsuite/27_io/basic_streambuf/overflow/char/2.cc, 3599.cc:
	Likewise.
	* testsuite/27_io/basic_streambuf/sputn/char/1057.cc: Likewise.
	* testsuite/27_io/basic_streambuf/sync/char/1057.cc: Likewise.

From-SVN: r84526
2004-07-11 19:13:59 +00:00
Paolo Carlini 1bf4ab23be Add wchar_t counterparts of the basic_stringbuf<char> tests.
2004-07-09  Paolo Carlini  <pcarlini@suse.de>

	Add wchar_t counterparts of the basic_stringbuf<char> tests.
	* testsuite/27_io/basic_stringbuf/imbue/wchar_t/1.cc, 9322.cc: New.
	* testsuite/27_io/basic_stringbuf/in_avail/wchar_t/1.cc: Likewise.
	* testsuite/27_io/basic_stringbuf/overflow/wchar_t/1.cc, 2.cc,
	3599.cc, 9988.cc: Likewise.
	* testsuite/27_io/basic_stringbuf/sbumpc/wchar_t/1.cc, 9825.cc:
	Likewise.
	* testsuite/27_io/basic_stringbuf/seekoff/wchar_t/1.cc, 2.cc:
	Likewise.
	* testsuite/27_io/basic_stringbuf/seekoff/wchar_t/1.cc, 2.cc, 3.cc:
	Likewise.
	* testsuite/27_io/basic_stringbuf/setbuf/wchar_t/1.cc, 2.cc, 3.cc:
	Likewise.
	* testsuite/27_io/basic_stringbuf/sgetc/wchar_t/1.cc: Likewise.
	* testsuite/27_io/basic_stringbuf/sgetn/wchar_t/1.cc: Likewise.
	* testsuite/27_io/basic_stringbuf/snextc/wchar_t/1.cc: Likewise.
	* testsuite/27_io/basic_stringbuf/sputbackc/wchar_t/1.cc, 9425.cc:
	Likewise.
	* testsuite/27_io/basic_stringbuf/sputc/wchar_t/1.cc, 1057.cc,
	9404-1.cc: Likewise.
	* testsuite/27_io/basic_stringbuf/sputn/wchar_t/1.cc, 1057.cc,
	9404-2.cc: Likewise.
	* testsuite/27_io/basic_stringbuf/str/wchar_t/1.cc, 2.cc, 3.cc,
	3955.cc: Likewise.
	* testsuite/27_io/basic_stringbuf/sungetc/wchar_t/1.cc: Likewise.
	* testsuite/27_io/basic_stringbuf/sync/wchar_t/1057.cc: Likewise.

From-SVN: r84405
2004-07-09 22:00:59 +00:00
Benjamin Kosnik 9e80211469 [multiple changes]
2004-07-07  Benjamin Kosnik  <bkoz@redhat.com>

	* configure.ac (libtool_VERSION): To 6:2:0.
	* configure: Regenerated.

	* testsuite/testsuite_abi.cc (check_version): Add 3.4.2.

2004-07-07  Aaron W. LaFramboise  <aaronraolete36@aaronwl.com>

	PR libstdc++/16411
	* config/linker-map.gnu: Add stdio_sync_filebuf::file exports.

From-SVN: r84264
2004-07-08 05:24:33 +00:00