Commit Graph

1004 Commits

Author SHA1 Message Date
Paolo Carlini a02def09c3 type_traits: Implement add_const, add_volatile, and add_cv.
2004-12-16  Paolo Carlini  <pcarlini@suse.de>

	* include/tr1/type_traits: Implement add_const, add_volatile,
	and add_cv.
	* testsuite/tr1/4_metaprogramming/const_volatile_modifications/
	add_const.cc: New.
	* testsuite/tr1/4_metaprogramming/const_volatile_modifications/
	add_cv.cc: Likewise.
	* testsuite/tr1/4_metaprogramming/const_volatile_modifications/
	add_volatile.cc: Likewise.

From-SVN: r92265
2004-12-16 15:00:37 +00:00
Paolo Carlini cacd0a2ccf type_traits: Implement is_function.
2004-12-16  Paolo Carlini  <pcarlini@suse.de>

	* include/tr1/type_traits: Implement is_function.
	(struct __sfinae_types, struct __is_function_helper): New.
	* testsuite/tr1/4_metaprogramming/composite_type_traits/
	is_object/is_object.cc: New.
	* testsuite/tr1/4_metaprogramming/composite_type_traits/
	is_object/typedefs.cc: Likewise.
	* testsuite/tr1/4_metaprogramming/primary_type_categories/
	is_function/is_function.cc: Likewise.
	* testsuite/tr1/4_metaprogramming/primary_type_categories/
	is_function/typedefs.cc: Likewise.

From-SVN: r92258
2004-12-16 11:35:56 +00:00
Paolo Carlini 0736fd563f type_traits: Minor tweak.
2004-12-12  Paolo Carlini  <pcarlini@suse.de>

	* include/tr1/type_traits: Minor tweak.
	* testsuite/tr1/4_metaprogramming/type_properties/extent/
	typedefs.cc: Fix date.

From-SVN: r92062
2004-12-12 21:01:37 +00:00
Paolo Carlini 973cb10b2d type_traits: Implement extent.
2004-12-12  Paolo Carlini  <pcarlini@suse.de>

	* include/tr1/type_traits: Implement extent.
	* testsuite/tr1/4_metaprogramming/type_properties/extent/
	extent.cc: New.
	* testsuite/tr1/4_metaprogramming/type_properties/extent/
	typedefs.cc: Likewise.

From-SVN: r92054
2004-12-12 18:07:41 +00:00
Paolo Carlini e192ab01d0 type_traits: Implement is_pointer, remove_pointer, and add_pointer; reformat.
2004-12-12  Paolo Carlini  <pcarlini@suse.de>

	* include/tr1/type_traits: Implement is_pointer, remove_pointer,
	and add_pointer; reformat.
	(_DEFINE_PRIMARY_SPEC_HELPER, _DEFINE_PRIMARY_SPEC): Generalize
	and rename to _DEFINE_SPEC_HELPER and _DEFINE_SPEC; update uses.
	* testsuite/tr1/4_metaprogramming/pointer_modifications/
	add_pointer.cc: New.
	* testsuite/tr1/4_metaprogramming/pointer_modifications/
	remove_pointer.cc: Likewise.
	* testsuite/tr1/4_metaprogramming/primary_type_categories/
	is_pointer/is_pointer.cc: Likewise.
	* testsuite/tr1/4_metaprogramming/primary_type_categories/
	is_pointer/typedefs.cc: Likewise.

	* testsuite/tr1/4_metaprogramming/primary_type_categories/
	is_reference/is_reference.cc: Slightly tweak consistently.

From-SVN: r92047
2004-12-12 14:31:11 +00:00
Paolo Carlini db5ff2363d type_traits: Implement rank.
2004-12-11  Paolo Carlini  <pcarlini@suse.de>

	* include/tr1/type_traits: Implement rank.
	* testsuite/testsuite_tr1.h (test_property): Generalize to any
	value_type.
	(test_category, test_relationship): Slightly tweak consistently.
	* testsuite/tr1/4_metaprogramming/type_properties/rank/
	rank.cc: New.
	* testsuite/tr1/4_metaprogramming/type_properties/rank/
	typedefs.cc: Likewise.

	* testsuite/tr1/4_metaprogramming/composite_type_traits/
	is_compound/is_compound.cc: New.
	* testsuite/tr1/4_metaprogramming/composite_type_traits/
	is_compound/typedefs.cc: Likewise.

	* testsuite/tr1/4_metaprogramming/composite_type_traits/
	is_arithmetic/is_arithmetic.cc: Tweak consistently with the
	testsuite_tr1.h changes.
	* 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.
	* testsuite/tr1/4_metaprogramming/relationships_between_types/
	is_same/is_same.cc: Likewise.
	* testsuite/tr1/4_metaprogramming/type_properties/is_const/
	is_const.cc: Likewise.
	* testsuite/tr1/4_metaprogramming/type_properties/is_volatile/
	is_volatile.cc: Likewise.

From-SVN: r92033
2004-12-11 21:46:27 +00:00
Paolo Carlini d5f60056f0 type_traits: Implement remove_const, remove_volatile, and remove_cv.
2004-12-10  Paolo Carlini  <pcarlini@suse.de>

	* include/tr1/type_traits: Implement remove_const, remove_volatile,
	and remove_cv.
	* testsuite/tr1/4_metaprogramming/const_volatile_modifications/
	remove_const.cc: New.
	* testsuite/tr1/4_metaprogramming/const_volatile_modifications/
	remove_cv.cc: Likewise.
	* testsuite/tr1/4_metaprogramming/const_volatile_modifications/
	remove_volatile.cc: Likewise.

	* testsuite/tr1/4_metaprogramming/primary_type_categories/
	is_array/is_array.cc: Slightly tweak consistently, remove typedefs,
	add a few tests.

From-SVN: r91990
2004-12-10 11:45:13 +00:00
Paolo Carlini 366e6bd173 type_traits: Implement remove_extent and remove_all_extents.
2004-12-09  Paolo Carlini  <pcarlini@suse.de>

	* include/tr1/type_traits: Implement remove_extent and
	remove_all_extents.
	* testsuite/tr1/4_metaprogramming/array_modifications/
	remove_all_extents.cc: New.
	* testsuite/tr1/4_metaprogramming/array_modifications/
	remove_extent.cc: Likewise.

From-SVN: r91958
2004-12-09 17:54:27 +00:00
Paolo Carlini d63a0e228c type_traits: Implement is_same, add_reference and remove_reference.
2004-12-08  Paolo Carlini  <pcarlini@suse.de>

	* include/tr1/type_traits: Implement is_same, add_reference and
	remove_reference.
	* testsuite/testsuite_tr1.h (test_relationship): New.
	* testsuite/tr1/4_metaprogramming/reference_modifications/
	add_reference.cc: New.
	* testsuite/tr1/4_metaprogramming/reference_modifications/
	remove_reference.cc: Likewise.
	* testsuite/tr1/4_metaprogramming/relationships_between_types/
	is_same/is_same.cc: Likewise.
	* testsuite/tr1/4_metaprogramming/relationships_between_types/
	is_same/typedefs.cc: Likewise.

	* testsuite/tr1/4_metaprogramming/type_properties/is_const/
	is_const.cc: Minor tweaks.
	* testsuite/tr1/4_metaprogramming/type_properties/is_volatile/
	is_volatile.cc: Likewise.

From-SVN: r91907
2004-12-08 16:33:51 +00:00
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