Commit Graph

2127 Commits

Author SHA1 Message Date
Paolo Carlini
76d0be83b2 re PR libstdc++/46303 ('mutex' is not a member of 'std' failures in 30_threads/call_once/constexpr.cc, 30_threads/mutex/cons/constexpr.cc, 30_threads/once_flag/cons/constexpr.cc)
2010-11-04  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/46303
	* testsuite/30_threads/call_once/constexpr.cc: Add missing dg-require
	directives.
	* testsuite/30_threads/mutex/cons/constexpr.cc: Likewise.
	* testsuite/30_threads/once_flag/cons/constexpr.cc: Likewise.

2010-11-04  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/ratio (ratio_add, ratio_subtract, ratio_multiply,
	ratio_divide): Declare the data members constexpr.
	* testsuite/20_util/ratio/requirements/constexpr_data.cc: Extend.

From-SVN: r166319
2010-11-04 17:02:25 +00:00
Benjamin Kosnik
0e6ac87eba tuple (tuple): Make default constructors constexpr.
2010-11-03  Benjamin Kosnik  <bkoz@redhat.com>

	* include/std/tuple (tuple): Make default constructors constexpr.
	* testsuite/20_util/tuple/cons/constexpr.cc: Add.

	* testsuite/18_support/initializer_list/requirements/
	constexpr_functions.cc: Add.
	* testsuite/18_support/initializer_list/constexpr.cc: Add.

From-SVN: r166301
2010-11-04 05:53:05 +00:00
Benjamin Kosnik
16684e9c0d chrono: Use typedefs.
2010-11-02  Benjamin Kosnik  <bkoz@redhat.com>

	* include/std/chrono: Use typedefs.
	* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Adjust
	line numbers.
	* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same.
	* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same.
	* testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same.

From-SVN: r166229
2010-11-03 01:59:07 +00:00
Paolo Carlini
53dc5044ed cinttypes: Remove, move contents to C++0x and TR1 headers.
2010-11-02  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/tr1_impl/cinttypes: Remove, move contents to C++0x
	and TR1 headers.
	* include/tr1_impl/cstdlib: Likewise.
	* include/tr1_impl/cstdio: Likewise.
	* include/tr1_impl/cctype: Likewise.
	* include/tr1_impl/boost_sp_counted_base.h: Likewise.
	* include/tr1_impl/cmath: Likewise.
	* include/tr1_impl/cfenv: Likewise.
	* include/tr1_impl/utility: Likewise.
	* include/tr1_impl/complex: Likewise.
	* include/tr1_impl/cwchar: Likewise.
	* include/tr1_impl/type_traits: Likewise.
	* include/tr1_impl/cstdint: Likewise.
	* include/tr1_impl/regex: Likewise.
	* include/tr1_impl/array: Likewise.
	* include/tr1_impl/cwctype: Likewise.
	* include/Makefile.am: Adjust.
	* include/Makefile.in: Regenerate.
	* src/condition_variable.cc: Adjust; consistently use
	_GLIBCXX_BEGIN_NAMESPACE and _GLIBCXX_END_NAMESPACE.
	* src/mutex.cc: Likewise.
	* src/future.cc: Likewise.
	* src/atomic.cc: Likewise.
	* src/chrono.cc: Likewise.
	* src/thread.cc: Likewise.
	* include/std/tuple: Likewise.
	* include/std/utility: Likewise.
	* include/std/thread: Likewise.: Likewise.
	* include/std/type_traits: Likewise.
	* include/std/memory: Likewise.
	* include/std/future: Likewise.
	* include/std/ratio: Likewise.
	* include/std/chrono: Likewise.
	* include/std/condition_variable: Likewise.
	* include/std/mutex: Likewise.
	* include/std/functional: Likewise.
	* include/std/complex: Likewise.
	* include/std/typeindex: Likewise.
	* include/std/array: Likewise.
	* include/bits/regex_compiler.h: Likewise.
	* include/bits/regex_grep_matcher.tcc: Likewise.
	* include/bits/regex_grep_matcher.h: Likewise.
	* include/bits/regex_constants.h: Likewise.
	* include/bits/regex_cursor.h: Likewise.
	* include/bits/regex_nfa.tcc: Likewise.
	* include/bits/shared_ptr_base.h: Likewise.
	* include/bits/regex_nfa.h: Likewise.
	* include/bits/random.tcc: Likewise.
	* include/bits/regex.h: Likewise.
	* include/bits/random.h: Likewise.
	* include/bits/regex_error.h: Likewise.
	* include/c_global/cinttypes: Likewise.
	* include/c_global/cstdlib: Likewise.
	* include/c_global/cstdio: Likewise.
	* include/c_global/cctype: Likewise.
	* include/c_global/cmath: Likewise.
	* include/c_global/cfenv: Likewise.
	* include/c_global/cwchar: Likewise.
	* include/c_global/cstdint: Likewise.
	* include/c_global/cwctype: Likewise.
	* include/tr1/shared_ptr.h: Likewise.
	* include/tr1/cinttypes: Likewise.
	* include/tr1/cstdio: Likewise.
	* include/tr1/cfenv: Likewise.
	* include/tr1/utility: Likewise.
	* include/tr1/cwchar: Likewise.
	* include/tr1/type_traits: Likewise.
	* include/tr1/memory: Likewise.
	* include/tr1/cstdint: Likewise.
	* include/tr1/regex: Likewise.
	* include/tr1/cwctype: Likewise.
	* include/tr1/cstdlib: Likewise.
	* include/tr1/cctype: Likewise.
	* include/tr1/cmath: Likewise.
	* include/tr1/complex: Likewise.
	* include/tr1/array: Likewise.
	* include/c_compatibility/fenv.h: Likewise.
	* include/c_compatibility/stdint.h: Likewise.
	* include/c_compatibility/inttypes.h: Likewise.
	* testsuite/tr1/2_general_utilities/shared_ptr/cons/43820.cc: Adjust
	dg-error line numbers.
	* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
	* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
	* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
	* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Likewise.
	* testsuite/20_util/make_unsigned/requirements/
	typedefs_neg.cc: Likewise.
	* testsuite/20_util/declval/requirements/1_neg.cc: Likewise.
	* testsuite/20_util/shared_ptr/cons/43820.cc: Likewise.
	* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Likewise.

From-SVN: r166211
2010-11-02 18:51:23 +00:00
Paolo Carlini
a9992f7f6b syntax_option_type.cc: Avoid -Wall warnings.
2010-11-02  Paolo Carlini  <paolo.carlini@oracle.com

	* testsuite/28_regex/05_constants/syntax_option_type.cc: Avoid
	-Wall warnings.
	* testsuite/28_regex/08_basic_regex/requirements/constexpr_data.cc:
	Likewise.
	* testsuite/18_support/numeric_limits/requirements/
	constexpr_functions.cc: Likewise.
	* testsuite/18_support/numeric_limits/requirements/
	constexpr_data.cc: Likewise.
	* testsuite/21_strings/char_traits/requirements/
	constexpr_functions.cc: Likewise.
	* testsuite/26_numerics/random/independent_bits_engine/requirements/
	constexpr_functions.cc: Likewise.
	* testsuite/26_numerics/random/subtract_with_carry_engine/
	requirements/constexpr_functions.cc: Likewise.
	* testsuite/26_numerics/random/subtract_with_carry_engine/
	requirements/constexpr_data.cc: Likewise.
	* testsuite/26_numerics/random/discard_block_engine/requirements/
	constexpr_functions.cc: Likewise.
	* testsuite/26_numerics/random/discard_block_engine/requirements/
	constexpr_data.cc: Likewise.
	* testsuite/26_numerics/random/mersenne_twister_engine/
	requirements/constexpr_functions.cc: Likewise.
	* testsuite/26_numerics/random/mersenne_twister_engine/
	requirements/constexpr_data.cc: Likewise.
	* testsuite/26_numerics/random/linear_congruential_engine/
	requirements/constexpr_functions.cc: Likewise.
	* testsuite/26_numerics/random/linear_congruential_engine/
	requirements/constexpr_data.cc: Likewise.
	* testsuite/26_numerics/random/shuffle_order_engine/
	requirements/constexpr_functions.cc: Likewise.
	* testsuite/26_numerics/random/shuffle_order_engine/
	requirements/constexpr_data.cc: Likewise.
	* testsuite/26_numerics/complex/requirements/
	constexpr_functions.cc: Likewise.
	* testsuite/23_containers/bitset/requirements/
	constexpr_functions.cc: Likewise.
	* testsuite/23_containers/array/requirements/
	constexpr_functions.cc: Likewise.
	* testsuite/util/testsuite_common_types.h: Likewise.
	* testsuite/20_util/duration/requirements/
	constexpr_functions.cc: Likewise.
	* testsuite/20_util/duration_cast/constexpr.cc: Likewise.
	* testsuite/20_util/time_point/requirements/
	constexpr_functions.cc: Likewise.
	* testsuite/20_util/ratio/requirements/constexpr_data.cc: Likewise.

	* testsuite/tr1/4_metaprogramming/integral_constant/
	requirements/constexpr_data.cc: Remove.

From-SVN: r166210
2010-11-02 18:25:55 +00:00
Benjamin Kosnik
94a86be0dd libstdc++: N3126 draft support.
* include/std/chrono: Extend constexpr application.
	* testsuite/util/testsuite_common_types.h
	(constexpr_default_constructible, constexpr_single_value_constructible)
	: Add comments about implied constraints.
	* testsuite/20_util/duration/cons/constexpr.cc: Activate all tests.
	* testsuite/20_util/time_point/cons/constexpr.cc: Same.
	* testsuite/20_util/time_point/requirements/constexpr_functions.cc:
	Same.
	* testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust line
	numbers.
	* testsuite/20_util/time_point_cast/constexpr.cc: New.

	* include/std/bitset: Use __SIZEOF_* macros to re-create original
	logic instead of slipshod application of
	std::numeric_limits<T>::max() macros.
	* testsuite/util/testsuite_common_types.h
	(constexpr_default_constructible): Modify.

	* include/std/chrono: Tested constexpr.
	* testsuite/20_util/duration_cast/constexpr.cc: New.
	* testsuite/20_util/time_point/cons/constexpr.cc: New.

	* testsuite/20_util/duration/cons/constexpr.cc: Add single_value tests.
	* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Adjust
	line numbers.
	* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same.
	* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same.
	* testsuite/20_util/time_point/cons/constexpr.cc: Add single_value
	tests.
	* testsuite/20_util/time_point/requirements/constexpr_functions.cc: Add.

	* testsuite/util/testsuite_common_types.h: Adjust init.

	* include/std/chrono (duration): Remove defaulted constructor,
	replace with mem-init list.
	* testsuite/20_util/duration/cons/constexpr.cc: Add single value.
	* testsuite/20_util/duration/requirements/constexpr_functions.cc:
	Add non-static member functions.

	* testsuite/20_util/default_delete/cons/constexpr.cc: New, xfail.
	* testsuite/20_util/enable_shared_from_this/cons/constexpr.cc: Same.
	* testsuite/20_util/shared_ptr/cons/constexpr.cc: Same.
	* testsuite/20_util/time_point/requirements/constexpr_functions.cc:
	Same.
	* testsuite/20_util/unique_ptr/cons/constexpr.cc: Same.
	* testsuite/20_util/weak_ptr/cons/constexpr.cc: Same.

	* include/std/bitset: Add constexpr as per N3126 draft.
	* testsuite/23_containers/bitset/cons/constexpr.cc: New.
	* testsuite/23_containers/bitset/requirements/constexpr_functions.cc:
	New.

	* testsuite/util/testsuite_common_types.h: Reset condition.

	* include/bits/random.h: Remove misleading comments.
	* include/bits/regex.h: Add constexpr.
	* testsuite/28_regex/05_constants/syntax_option_type.cc: Add tests.
	* testsuite/28_regex/08_basic_regex/requirements/constexpr_data.cc: New.

	PR libstdc++/46134
	* include/std/chrono: Use default constructor.
	* testsuite/util/testsuite_common_types.h
	(constexpr_default_constructible): Adjust condition.

	PR libstdc++/46133
	* include/std/complex: Adjust complex specialization default
	constructors for constexpr.
	* testsuite/26_numerics/complex/cons/constexpr.cc: Enable tests.

	* include/bits/random.h: Adjust for constexpr as per N3126 draft.
	* testsuite/26_numerics/random/discard_block_engine/requirements/
	constexpr_data.cc: New.
	* testsuite/26_numerics/random/discard_block_engine/requirements/
	constexpr_functions.cc: New.
	* testsuite/26_numerics/random/independent_bits_engine/requirements/
	constexpr_functions.cc: New.
	* testsuite/26_numerics/random/linear_congruential_engine/requirements/
	constexpr_data.cc: New.
	* testsuite/26_numerics/random/linear_congruential_engine/requirements/
	constexpr_functions.cc: New.
	* testsuite/26_numerics/random/mersenne_twister_engine/requirements/
	constexpr_data.cc: New.
	* testsuite/26_numerics/random/mersenne_twister_engine/requirements/
	constexpr_functions.cc: New.
	* testsuite/26_numerics/random/shuffle_order_engine/requirements/
	constexpr_data.cc: New.
	* testsuite/26_numerics/random/shuffle_order_engine/requirements/
	constexpr_functions.cc: New.
	* testsuite/26_numerics/random/subtract_with_carry_engine/requirements/
	constexpr_data.cc: New.
	* testsuite/26_numerics/random/subtract_with_carry_engine/requirements/
	constexpr_functions.cc: New.

	* include/bits/stream_iterator.h: Add constexpr as per N3126 draft.
	* include/bits/streambuf_iterator.h: Same.
	* include/std/complex: Same.
	* testsuite/24_iterators/istream_iterator/cons/constexpr.cc: New.
	* testsuite/24_iterators/istreambuf_iterator/cons/constexpr.cc: New.
	* testsuite/26_numerics/complex/cons/constexpr.cc: New.
	* testsuite/26_numerics/complex/requirements/constexpr_functions.cc:
	New.

	* include/bits/char_traits.h: Add constexpr as per N3126 draft.
	* testsuite/21_strings/char_traits/requirements/constexpr_functions.cc:
	New.

	* include/tr1_impl/array: Add constexpr as per N3126 draft.
	* testsuite/23_containers/array/requirements/
	constexpr_functions.cc: New.

	* include/bits/shared_ptr.h: Revert changes.
	* include/bits/unique_ptr.h: Same.

	* include/std/chrono: Adjust.
	* include/tr1_impl/type_traits: Same.

	* testsuite/util/testsuite_common_types.h: Add test functors.
	* testsuite/20_util/duration/cons/constexpr.cc: New.
	* testsuite/20_util/duration/requirements/constexpr_functions.cc: Same.
	* testsuite/20_util/pair/cons/constexpr.cc: Same.
	* testsuite/20_util/ratio/requirements/constexpr_data.cc: Same.
	* testsuite/27_io/ios_base/types/fmtflags/constexpr_operators.cc: Same.
	* testsuite/27_io/ios_base/types/iostate/constexpr_operators.cc: Same.
	* testsuite/27_io/ios_base/types/openmode/constexpr_operators.cc: Same.
	* testsuite/30_threads/call_once/constexpr.cc: Same.
	* testsuite/30_threads/mutex/cons/constexpr.cc: Same.
	* testsuite/30_threads/once_flag/cons/constexpr.cc: Same.
	* testsuite/tr1/4_metaprogramming/integral_constant/requirements/
	constexpr_data.cc: Same.

	* testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust line numbers.
	* testsuite/29_atomics/atomic/cons/copy_neg.cc: Same.
	* testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Same.
	* testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Same.
	* testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc: Same.

	* include/bits/allocator.h: Add constexpr as per N3126 draft.
	* include/bits/ios_base.h: Same.
	* include/bits/shared_ptr.h: Same.
	* include/bits/unique_ptr.h: Same.
	* include/bits/stl_iterator.h: Same.
	* include/bits/stl_pair.h: Same.
	* include/std/tuple: Same.
	* include/tr1_impl/type_traits: Same.
	* include/std/chrono: Same.
	* include/std/ratio: Same.
	* include/std/mutex: Same.
	* src/mutex.cc: Same.
	* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Adjust.
	* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same.
	* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same.
	* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same.
	* testsuite/27_io/ios_base/cons/assign_neg.cc: Same.
	* testsuite/27_io/ios_base/cons/copy_neg.cc: Same.

	* doc/doxygen/user.cfg.in: Replace _GLIBCXX_USE_CONSTEXPR,
	_GLIBCXX_CONSTEXPR for doxygen generation.

	* src/limits.cc: Undef.
	* testsuite/29_atomics/atomic/cons/constexpr.cc: Adjust.
	* testsuite/29_atomics/atomic_address/cons/constexpr.cc: Same.
	* testsuite/29_atomics/atomic_integral/cons/constexpr.cc: Same.
	* testsuite/29_atomics/atomic_integral/operators/bitwise_neg.c: Same.
	* testsuite/18_support/numeric_limits/constexpr.cc: To...
	* testsuite/18_support/numeric_limits/requirements/
	constexpr_data.cc, constexpr_functions.cc: ...this

	* testsuite/util/testsuite_common_types.h
	(constexpr_single_value_constructible): Add.
	* testsuite/29_atomics/atomic/cons/constexpr.cc: Adjust name.
	* testsuite/29_atomics/atomic_integral/cons/constexpr.cc: Same.
	* testsuite/29_atomics/atomic_address/cons/constexpr.cc: New.
	* testsuite/18_support/numeric_limits/constexpr.cc: New.

	* testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust line numbers.
	* testsuite/29_atomics/atomic/cons/constexpr.cc: Same.
	* testsuite/29_atomics/atomic/cons/copy_neg.cc: Same.
	* testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Same.
	* testsuite/29_atomics/atomic_integral/cons/constexpr.cc: Same.
	* testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Same.
	* testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc: Same.
	* testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc: Same.
	* testsuite/29_atomics/atomic_integral/operators/increment_neg.cc: Same.

	* include/bits/c++config (_GLIBCXX_CONSTEXPR): Add.
	(_GLIBCXX_USE_CONSTEXPR): Add.
	* include/std/limits: Use it.
	* src/limits.cc: Adjust.
	* testsuite/ext/profile/mutex_extensions.cc: Change line number.

	* include/bits/atomic_0.h: Rework for N3126 draft, add constexpr.
	* include/bits/atomic_2.h: Same.
	* include/bits/atomic_base.h: Same.
	* include/std/atomic: Same.
	* src/atomic.cc: Same.
	* include/bits/atomicfwd_c.h: Remove.
	* include/bits/atomicfwd_cxx.h: Remove.
	* include/c_compatibility/stdatomic.h: Remove.
	* include/Makefile.am: Remove atomicfwd_c.h, atomicfwd_cxx.h,
	stdatomic.h.
	* include/Makefile.in: Regenerate.
	* doc/xml/manual/using.xml: Update list of header files for changes.
	* testsuite/util/testsuite_common_types.h
	(constexpr_constructible): Add.
	* testsuite/29_atomics/atomic/cons/constexpr.cc: New.
	* testsuite/29_atomics/atomic_integral/cons/constexpr.cc: New.
	* testsuite/17_intro/headers/c++200x/stdc++.cc: Modify.
	* testsuite/29_atomics/atomic/cons/assign_neg.cc: Same.
	* testsuite/29_atomics/atomic_address/cons/assign_neg.cc: Same.
	* testsuite/29_atomics/atomic_flag/cons/1.cc: Same.
	* testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Same.
	* testsuite/29_atomics/headers/atomic/macros.cc: Same.
	* testsuite/29_atomics/headers/atomic/types_std_c++0x.cc: Same.
	* testsuite/29_atomics/headers/atomic/types_std_c++0x_neg.cc: Same.
	* testsuite/29_atomics/atomic_flag/test_and_set/implicit.c: Remove.
	* testsuite/29_atomics/atomic_flag/test_and_set/explicit.c: Same.
	* testsuite/29_atomics/atomic_flag/clear/1.c: Same.
	* testsuite/29_atomics/headers/stdatomic.h/debug_mode.c: Same.
	* testsuite/29_atomics/headers/stdatomic.h/functions.c: Same.
	* testsuite/29_atomics/headers/stdatomic.h/macros.c: Same.
	* testsuite/29_atomics/headers/stdatomic.h/types.c: Same.

	* testsuite/util/testsuite_abi.cc: Add GLIBCXX_3.4.16.

From-SVN: r166171
2010-11-01 22:35:28 -04:00
Jason Merrill
fa2200cbb1 call.c (null_ptr_cst_p): Use maybe_constant_value.
* call.c (null_ptr_cst_p): Use maybe_constant_value.
	(set_up_extended_ref_temp): Support constant initialization.
	(initialize_reference): Adjust.
	* class.c (check_bitfield_decl): Use cxx_constant_value.
	* cvt.c (ocp_convert): Don't use integral_constant_value when
	converting to class type.
	* decl.c (finish_case_label): Use maybe_constant_value.
	(build_init_list_var_init): Support constant initialization.
	(check_initializer): Likewise.  Reorganize.
	(cp_finish_decl): Likewise.
	(expand_static_init): Likewise.
	(compute_array_index_type): Use maybe_constant_value.
	Add complain parm.
	(create_array_type_for_decl, grokdeclarator): Pass it.
	(build_enumerator): Use cxx_constant_value.
	* decl2.c (grokfield): Use maybe_constant_init.
	* except.c (check_noexcept_r): Handle constexpr.
	(build_noexcept_spec): Use maybe_constant_value.
	* init.c (expand_default_init): Support constant initialization.
	(build_vec_init): Likewise.
	(constant_value_1): Adjust.
	(build_new_1): Adjust.
	* parser.c (cp_parser_constant_expression): Allow non-integral
	in C++0x mode.
	(cp_parser_direct_declarator): Don't fold yet in C++0x mode.
	(cp_parser_initializer_clause): Toss folded result if non-constant.
	* pt.c (fold_decl_constant_value): Remove.
	(convert_nontype_argument): Use maybe_constant_value.  Give clearer
	error about overflow.
	(tsubst): Move array bounds handling into compute_array_index_type.
	(value_dependent_expression_p): Handle constant CALL_EXPR.
	* semantics.c (finish_static_assert): Use maybe_constant_value.
	(ensure_literal_type_for_constexpr_object): Make sure type is complete.
	(potential_constant_expression): Use maybe_constant_value.
	* tree.c (cast_valid_in_integral_constant_expression_p): Any cast
	is potentially valid in C++0x.
	* typeck2.c (store_init_value): Handle constant init.
	(check_narrowing): Use maybe_constant_value.
	(build_functional_cast): Set TREE_CONSTANT on literal T().
	* cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): Remove.
	(LOOKUP_ALREADY_DIGESTED): New.
	(compute_array_index_type): Adjust prototype.

From-SVN: r166167
2010-11-01 21:31:18 -04:00
Paolo Carlini
19fd98331d dr1325-2.cc: Fix typo.
2010-10-31  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/23_containers/bitset/cons/dr1325-2.cc: Fix typo.
	* testsuite/20_util/hash/quality.cc: Avoid -Wall warnings.
	* testsuite/20_util/hash/chi2_quality.cc: Likewise.

From-SVN: r166114
2010-11-01 00:08:58 +00:00
Paolo Carlini
fb7342fd6f PR libstdc++/44436 (partial)
2010-10-28  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/44436 (partial)
	* include/bits/hashtable.h (_Hashtable<>::insert(value_type&&),
	insert(_Pair&&), insert(const_iterator, value_type&&),
	insert(const_iterator, _Pair&&)): Add.
	(_M_allocate_node, _M_insert, _M_insert_bucket): Templatize.
	* include/bits/hashtable_policy.h (__detail::_Select1st): Add; use
	it throughout.
	(_Map_base<>::operator[](_Key&&)): Add.
	* include/bits/unordered_map.h: Use __detail::_Select1st throughout.
	* include/debug/unordered_map: Update.
	* include/debug/unordered_set: Likewise.
	* include/profile/unordered_map: Likewise.
	* include/profile/unordered_set: Likewise.
	* testsuite/util/testsuite_rvalref.h (struct hash<rvalstruct>): Add;
	minor tweaks throughout, use deleted special members.
	* testsuite/23_containers/unordered_map/insert/map_single_move-1.cc:
	New.
	* testsuite/23_containers/unordered_map/insert/map_single_move-2.cc:
	Likewise.
	* testsuite/23_containers/unordered_map/insert/array_syntax_move.cc:
	Likewise.
	* testsuite/23_containers/unordered_multimap/insert/
	multimap_single_move-1.cc: Likewise.
	* testsuite/23_containers/unordered_multimap/insert/
	multimap_single_move-2.cc: Likewise.
	* testsuite/23_containers/unordered_set/insert/set_single_move.cc:
	Likewise.
	* testsuite/23_containers/unordered_multiset/insert/
	multiset_single_move.cc: Likewise.

	* testsuite/23_containers/unordered_map/insert/array_syntax.cc:
	Minor cosmetic changes.

From-SVN: r166030
2010-10-28 16:01:05 +00:00
Jason Merrill
2b08f2c561 c-common.c (c_common_reswords): Add __is_literal_type.
gcc/c-family/
	* c-common.c (c_common_reswords): Add __is_literal_type.
	* c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
gcc/cp/
	* cp-tree.h (cp_trait_kind): Add CPTK_IS_LITERAL_TYPE.
	* cxx-pretty-print.c (pp_cxx_trait_expression): Handle it.
	* semantics.c (trait_expr_value, finish_trait_expr): Likewise.
	* parser.c (cp_parser_primary_expression): Handle RID_IS_LITERAL_TYPE.
	(cp_parser_trait_expr): Likewise.
libstdc++-v3/
	* include/std/type_traits (is_literal_type): New.

From-SVN: r166020
2010-10-27 17:43:33 -04:00
Paolo Carlini
98fff892cc libstdc++.exp ([check_v3_target_normal_mode]): Add.
2010-10-26  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/lib/libstdc++.exp ([check_v3_target_normal_mode]): Add.
	* testsuite/lib/dg-options.exp ([dg-require-normal-mode]): Likewise.
	* testsuite/23_containers/headers/forward_list/synopsis.cc: Use the
	latter.
	* testsuite/23_containers/headers/vector/synopsis.cc: Likewise.
	* testsuite/23_containers/headers/deque/synopsis.cc: Likewise.
	* testsuite/23_containers/headers/bitset/synopsis.cc: Likewise.
	* testsuite/23_containers/headers/list/synopsis.cc: Likewise.
	* testsuite/23_containers/headers/set/synopsis.cc: Likewise.
	* testsuite/23_containers/headers/map/synopsis.cc: Likewise.

From-SVN: r165937
2010-10-26 10:22:43 +00:00
Paolo Carlini
deaf7b86cd forward_list.h (_Fwd_list_node_base::swap): Remove.
2010-10-25  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/forward_list.h (_Fwd_list_node_base::swap): Remove.
	(_Fwd_list_base<>::_Fwd_list_base(_Fwd_list_base&&),
	_Fwd_list_base<>::_Fwd_list_base(_Fwd_list_base&&, const _Alloc&)):
	Don't use swap.
	(forward_list<>::swap): Just use std::swap.

	* include/bits/forward_list.h (_Fwd_list_base<>::_Fwd_list_base(),
	_Fwd_list_base(const _Alloc&)): Don't zero again _M_next.

	* testsuite/23_containers/forward_list/requirements/dr438/
	assign_neg.cc: Adjust dg-error line number.
	* testsuite/23_containers/forward_list/requirements/dr438/
	insert_neg.cc: Likewise.
	* testsuite/23_containers/forward_list/requirements/dr438/
	constructor_1_neg.cc: Likewise.
	* testsuite/23_containers/forward_list/requirements/dr438/
	constructor_2_neg.cc: Likewise.

From-SVN: r165915
2010-10-25 10:47:19 +00:00
Paolo Carlini
e1d4e035fa re PR libstdc++/45866 ([C++0x] std::ratio_add, ratio_sub, ratio_multiply, ratio_divide do not have num and den members.)
2010-10-18  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/45866
	* include/std/ratio (ratio<>::type): Add.
	(ratio_add<>::num, ratio_add<>::den,
	ratio_subtract<>::num, ratio_subtract<>::den,
	ratio_multiply<>::num, ratio_multiply<>::den,
	ratio_divide<>::num, ratio_divide<>::den): Likewise.
	* testsuite/20_util/ratio/operations/45866.cc: New.

From-SVN: r165649
2010-10-18 17:28:15 +00:00
Paolo Carlini
efb7b45650 forward_list.h (forward_list<>::erase_after): Return an iterator.
2010-10-17  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/forward_list.h (forward_list<>::erase_after): Return
	an iterator.
	(_M_erase_after): Return _Fwd_list_node_base*.
	* include/bits/forward_list.tcc: Likewise.
	* include/debug/forward_list: Likewise.
	* testsuite/23_containers/forward_list/modifiers/3.cc: Update
	and extend.
	* testsuite/util/exception/safety.h (erase_base<forward_list<>>):
	Adjust.
	* testsuite/23_containers/forward_list/requirements/dr438/
	assign_neg.cc: Adjust dg-error line number.
	* testsuite/23_containers/forward_list/requirements/dr438/
	insert_neg.cc: Likewise.
	* testsuite/23_containers/forward_list/requirements/dr438/
	constructor_1_neg.cc: Likewise.
	* testsuite/23_containers/forward_list/requirements/dr438/
	constructor_2_neg.cc: Likewise.

From-SVN: r165590
2010-10-17 17:34:38 +00:00
Paolo Carlini
88c87359fa re PR libstdc++/43554 (profile-mode version of forward_list missing)
2010-10-17  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/43554
	* include/profile/forward_list: New file.
	* include/std/forward_list: Include <profile/forward_list>.
	* include/Makefile.am: Add.
	* testsuite/23_containers/forward_list/capacity/1.cc: Adjust.
	* include/Makefile.in: Regenerate.

From-SVN: r165587
2010-10-17 14:49:11 +00:00
Paolo Carlini
e74bf53a08 functional (function<>::operator==, operator!=): Remove, per LWG 1240.
2010-10-15  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/functional (function<>::operator==, operator!=):
	Remove, per LWG 1240.
	* testsuite/20_util/function/cmp/cmp_neg.cc: Adjust dg-* directives.

From-SVN: r165514
2010-10-15 17:14:57 +00:00
Paolo Carlini
879b9073c8 random.h (discrete_distribution<>::param_type:: param_type()): Default construct the vectors.
2010-10-13  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/random.h (discrete_distribution<>::param_type::
	param_type()): Default construct the vectors.
	(discrete_distribution<>::param_type::probabilities): Adjust.
	(discrete_distribution<>::probabilities): Likewise.
	(discrete_distribution<>::max): Likewise.
	(piecewise_constant_distribution<>::param_type::
	param_type()): Default construct the vectors.
	(piecewise_constant_distribution<>::param_type::intervals): Adjust.
	(piecewise_constant_distribution<>::param_type::densities): Likewise.
	(piecewise_constant_distribution<>::intervals): Likewise.
	(piecewise_constant_distribution<>::densities): Likewise.
	(piecewise_constant_distribution<>::min): Likewise.
	(piecewise_constant_distribution<>::max): Likewise.
	(piecewise_linear_distribution<>::param_type::
	param_type()): Default construct the vectors.
	(piecewise_linear_distribution<>::param_type::intervals): Adjust.
	(piecewise_linear_distribution<>::param_type::densities): Likewise.
	(piecewise_linear_distribution<>::intervals): Likewise.
	(piecewise_linear_distribution<>::densities): Likewise.
	(piecewise_linear_distribution<>::min): Likewise.
	(piecewise_linear_distribution<>::max): Likewise.
	* include/bits/random.tcc (discrete_distribution<>::param_type::
	_M_initialize): Deal quickly with raw _M_prob equivalent to
	a default constructed param_type, just clear the vector.
	(discrete_distribution<>::operator()): Early return 0 for a
	default constructed distribution.
	(piecewise_constant_distribution<>::param_type::_M_initialize):
	Likewise for _M_int and _M_den.
	(piecewise_constant_distribution<>::operator()): Early return
	for a default constructed distribution.
	(piecewise_linear_distribution<>::param_type::_M_initialize):
	Likewise.
	(piecewise_linear_distribution<>::operator()): Early return
	for a default constructed distribution.
	* testsuite/26_numerics/random/discrete_distribution/operators/
	call-default.cc: New.
	* testsuite/26_numerics/random/piecewise_constant_distribution/
	operators/call-default.cc: Likewise.

From-SVN: r165427
2010-10-13 16:31:17 +00:00
Paolo Carlini
d3a7350497 random.tcc (piecewise_linear_distribution<>:: operator()): Don't crash when the dist is default-constructed.
2010-10-12  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/random.tcc (piecewise_linear_distribution<>::
	operator()): Don't crash when the dist is default-constructed.
	* testsuite/26_numerics/random/piecewise_linear_distribution/
	operators/call-default.cc: New.

From-SVN: r165379
2010-10-12 13:35:22 +00:00
Paolo Carlini
a0a2a39912 [multiple changes]
2010-10-11  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* testsuite/23_containers/bitset/cons/2.cc: Tweak.

2010-10-11  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/bitset (bitset<>::bitset(const _CharT*,
	typename std::basic_string<>::size_type, _CharT, _CharT)):
	Implement new proposed resolution for DR 1325.
	* include/debug/bitset: Likewise.
	* include/profile/bitset: Likewise.
	* testsuite/23_containers/bitset/cons/dr1325-1.cc: New.
	* testsuite/23_containers/bitset/cons/dr1325-2.cc: Likewise.

From-SVN: r165338
2010-10-11 22:32:01 +00:00
Jonathan Wakely
d3ec3e15d3 future: Enable allocator support.
* include/std/future: Enable allocator support.
	* testsuite/30_threads/packaged_task/cons/alloc.cc: Expect PASS.
	* testsuite/30_threads/promise/cons/alloc.cc: Expect PASS.

From-SVN: r165147
2010-10-08 02:06:27 +01:00
Jonathan Wakely
1b3fad8156 re PR libstdc++/45893 ([C++0x] [DR 817] Finish updating std::bind to rvalue refs)
2010-10-08  Jonathan Wakely  <jwakely.gcc@gmail.com>

	PR libstdc++/45893
	* include/std/functional (bind): Implement DR 817 and add support
	for volatile-qualified call wrappers.
	* include/std/mutex (call_once): Implement DR 891.
	* include/std/thread (thread::thread): Implement DR 929.
	* include/std/future: Optimise use of std::bind.
	* testsuite/20_util/bind/cv_quals.cc: Test volatile-qualification.
	* testsuite/20_util/bind/move.cc: New.

From-SVN: r165144
2010-10-08 01:44:12 +01:00
Hans-Peter Nilsson
599fdf0ca5 re PR libstdc++/45841 (r164529 cris-elf libstdc++ 27_io/basic_filebuf/seekoff/char/2-io.cc)
PR libstdc++/45841
	* testsuite/lib/libstdc++.exp (check_v3_target_fileio): Rewrite to
	use an actual testsuite file and machinery, not ".".  Specifically
	check that incorrectly seeking backwards from 0 yields an error,
	and that reading, seeking backwards and reading again works.

From-SVN: r165136
2010-10-07 21:46:51 +00:00
Hans-Peter Nilsson
38851a969d conformance.exp: Apply check_v3_target_fileio as a gate for tests in subdirectories matching the...
* testsuite/libstdc++-dg/conformance.exp: Apply
	check_v3_target_fileio as a gate for tests in
	subdirectories matching the substring _filebuf.

From-SVN: r165135
2010-10-07 21:44:36 +00:00
Paolo Carlini
a4a7631d2b locale_facets_nonio.tcc (time_get<>:: _M_extract_via_format): Tighten somewhat error checking.
2010-10-07  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/locale_facets_nonio.tcc (time_get<>::
	_M_extract_via_format): Tighten somewhat error checking.
	* testsuite/22_locale/time_get/get_time/char/6.cc: New.
	* testsuite/22_locale/time_get/get_time/wchar_t/6.cc: Likewise.

From-SVN: r165094
2010-10-07 11:23:07 +00:00
Jonathan Wakely
b32c4963b9 re PR libstdc++/45924 ([C++0x] bind<R>(x)(y, z) fails)
PR libstdc++/45924
	* include/std/functional (_Bind_result::operator()): Do not expand
	template parameter pack in forward call.
	* testsuite/20_util/bind/45924.cc: New.

From-SVN: r165072
2010-10-07 01:17:24 +01:00
Paolo Carlini
8cfaf4c938 functional (struct _Weak_result_type_impl): Add specializazions for cv-qualified function types...
2010-10-06  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/functional (struct _Weak_result_type_impl): Add
	specializazions for cv-qualified function types, for variadic
	function types and pointers and references to function types,
	and for pointers to member function types.
	(struct _Reference_wrapper_base): Add specializations for
	cv-qualified unary and binary function types.
	* testsuite/20_util/reference_wrapper/result_type.cc: New.
	* testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.

From-SVN: r165056
2010-10-06 17:17:16 +00:00
David Krauss
47b90d6b32 re PR libstdc++/45841 (r164529 cris-elf libstdc++ 27_io/basic_filebuf/seekoff/char/2-io.cc)
2010-10-05  David Krauss  <potswa@mac.com>

	PR libstdc++/45841
	* include/bits/fstream.h (basic_filebuf::underflow): Overflow
	success does not preclude returning failure.
	(basic_filebuf::pbackfail): Likewise.
	(basic_filebuf::xsputn): Fix indentation problem.
	(basic_filebuf::xsgetn): Likewise. Also, add similar overflow
	call to enable optimized case from write mode.
	* testsuite/27_io/basic_filebuf/underflow/char/45841.cc: New.
	* testsuite/27_io/basic_filebuf/underflow/wchar_t/45841.cc: Likewise.

From-SVN: r165009
2010-10-06 00:17:28 +00:00
Benjamin Kosnik
bf718682e1 extract_symvers: Add support for tracking TLS symbols.
2010-10-01  Benjamin Kosnik  <bkoz@redhat.com>

	* scripts/extract_symvers: Add support for tracking TLS symbols.
	* testsuite/util/testsuite_abi.h (symbol::category): Add tls type.
	* testsuite/util/testsuite_abi.cc: Set symbol type to tls when
	appropriate, collect size info.

From-SVN: r164892
2010-10-01 17:10:38 +00:00
Rainer Orth
33f4936701 extract_symvers: Use pvs if present.
* scripts/extract_symvers: Use pvs if present.
	* config/abi/post/solaris2.8/baseline_symbols.txt: New file.
	* config/abi/post/solaris2.8/sparcv9/baseline_symbols.txt: Likewise.
	* config/abi/post/solaris2.10/amd64/baseline_symbols.txt: Likewise.
	* config/abi/post/solaris2.10/baseline_symbols.txt: Likewise.
	* config/abi/post/solaris2.10/sparcv9/baseline_symbols.txt: Likewise.
	* configure.host (i?86-*-solaris2*): Remove.
	(sparc*-*-solaris2*): Remove.
	(*-*-solaris2.[89]): Use solaris2.8 baseline.
	(*-*-solaris2.1[0-9]): Use solaris2.10 baseline.
	* testsuite/Makefile.am (new-abi-baseline): Add missing /.
	* testsuite/Makefile.in: Regenerate.

From-SVN: r164879
2010-10-01 11:58:21 +00:00
Paolo Carlini
b8b4301eec [multiple changes]
2010-09-29  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/Makefile.am: Add debug/forward_list.
	* include/Makefile.in: Regenerate.

	* testsuite/util/testsuite_container_traits.h (traits_base):
	Add has_erase_after and hash_insert_after typedefs.
	(traits<forward_list<>>): Adjust.
	* testsuite/util/exception/safety.h (erase_point, erase_range,
	insert_point): Deal correctly with forward_list.
	* include/Makefile.am: Add.

2010-09-29  François Dumont  <francois.cppdevs@free.fr>

	* src/debug.cc: Add forward_list specific debug messages.
	* include/debug/forward_list: New.
	* include/debug/formatter.h: Add debug message ids and before begin
	iterator state.
	* include/debug/macros.h (__glibcxx_check_insert_after,
	__glibcxx_check_insert_range_after, __glibcxx_check_erase_after,
	__glibcxx_check_erase_range_after): Add.
	* include/debug/safe_iterator.h (_BeforeBeginHelper): Add.
	(_Safe_iterator<>::_M_before_dereferenceable,
	_Safe_iterator<>::_M_is_before_begin): Add.
	(_Safe_iterator<>::_M_dereferenceable, _Safe_iterator<>::_M_is_end,
	_Safe_iterator<>::_M_incrementable): Adjust.
	* include/std/forward_list: Include debug/forward when _GLIBCXX_DEBUG
	defined.
	* include/bits/forward_list.h, forward_list.tcc: Put in std::__norm
	when debug mode is active.
	* testsuite/23_containers/forward_list/capacity/1.cc: Fix to compile
	even in debug mode.
	* testsuite/23_containers/forward_list/debug/erase_after1.cc,
	erase_after2.cc, erase_after3.cc, erase_after4.cc, erase_after5.cc,
	insert_after1.cc,erase_after6.cc, erase_after7.cc, insert_after2.cc,
	erase_after8.cc, insert_after3.cc, erase_after9.cc: New.

From-SVN: r164717
2010-09-29 11:56:34 +00:00
Matt Austern
2e9c3ef354 chi2_quality.cc: New.
2010-09-28  Matt Austern  <austern@google.com>

	* testsuite/20_util/hash/chi2_quality.cc: New.
	* testsuite/20_util/hash/quality.cc: Likewise.

From-SVN: r164682
2010-09-28 10:35:53 +00:00
Paolo Carlini
aa2b7414b0 allocator.h (allocator_arg_t, [...]): Add.
2010-09-27  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/allocator.h (allocator_arg_t, allocator_arg,
	uses_allocator): Add.
	* testsuite/20_util/uses_allocator/value.cc: New.
	* testsuite/20_util/uses_allocator/requirements/typedefs.cc: Likewise.
	* testsuite/20_util/uses_allocator/requirements/
	explicit_instantiation.cc: Likewise.
	* include/bits/stl_queue.h (uses_allocator<queue>,
	uses_allocator<priority_queue>): Add.
	* include/bits/stl_stack.h (uses_allocator<stack>): Likewise.

	* include/bits/stl_pair.h (piecewise_construct): Add.
	* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Adjust dg-error
	line number.

From-SVN: r164654
2010-09-27 17:27:43 +00:00
David Krauss
3531cf5ef3 re PR libstdc++/45628 (std::fstream::tellg invalidates I/O buffer)
2010-09-22  David Krauss  <potswa@mac.com>

	PR libstdc++/45628
	* include/bits/fstream.tcc (basic_filebuf::underflow): Add state
	transition to avoid modality requiring seekoff(0,ios::cur).
	(basic_filebuf::pbackfail): Likewise.
	(basic_filebuf::overflow): Likewise.
	(basic_filebuf::_M_seek): Avoid minor unnecessary conversion.
	(basic_filebuf::seekoff): Remove code to _M_get_ext_pos; make
	(0, ios::cur) a special case preserving buffer contents.
	(basic_filebuf::_M_get_ext_pos): New function to obtain status
	about codecvt extern_t buffer for overflow and seekoff.
	* include/std/fstream (basic_filebuf::_M_get_ext_pos): Likewise.
	* config/abi/pre/gnu.ver: Export new symbols.
	* testsuite/27_io/basic_filebuf/seekoff/char/45628-1.cc: New,
	verifies that seekoff(0, ios::cur) preserves buffers.
	* testsuite/27_io/basic_filebuf/seekoff/char/45628-2.cc: Likewise.
	for codecvt case. More lenient as it may still flush put area.
	* testsuite/27_io/basic_filebuf/seekoff/char/4.cc: Modify to
	check that seekoff is not required between read and write.
	* testsuite/27_io/basic_filebuf/seekoff/wchar_t/4.cc: Likewise.
	* testsuite/27_io/basic_filebuf/sync/wchar_t/1.cc: Remove.
	* testsuite/27_io/basic_filebuf/sync/wchar_t/1.cc: Likewise.
	* testsuite/util/testsuite_character.h (codecvt::do_length): Comply
	with 22.2.1.5.2/10 "Returns ... the LARGEST value in the range..."

From-SVN: r164529
2010-09-22 19:40:43 +00:00
Paolo Carlini
bafa9791ac typeindex: New.
2010-09-22  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/typeindex: New.
	* include/Makefile.am: Add.
	* include/Makefile.in: Regenerate.
	* include/precompiled/stdc++.h: Add.
	* testsuite/20_util/typeindex/comparison_operators.cc: New.
	* testsuite/20_util/typeindex/hash.cc: Likewise.
	* testsuite/20_util/typeindex/hash_code.cc: Likewise.
	* testsuite/20_util/typeindex/name.cc: Likewise.

	* testsuite/18_support/type_info/hash_code.cc: Tweak.

From-SVN: r164521
2010-09-22 12:04:08 +00:00
Paolo Carlini
33da99cb9c hash_bytes.cc: Move...
2010-09-22  Paolo Carlini  <paolo.carlini@oracle.com>

	* src/hash_bytes.cc: Move...
	* libsupc++/hash_bytes.cc: ... here.
	* src/Makefile.am: Adjust.
	* libsupc++/Makefile.am: Likewise.
	* config/abi/pre/gnu.ver: Likewise.
	* libsupc++/typeinfo (type_info::hash_code): Add in C++0x mode.
	* src/Makefile.in: Regenerate.
	* libsupc++/Makefile.am: Likewise.
	* testsuite/18_support/type_info/hash_code.cc: New.

From-SVN: r164510
2010-09-22 08:19:08 +00:00
Luc Hermitte
fc99f7809e re PR libstdc++/45713 (sizeof std::bitset<ULONG_MAX> == 1)
2010-09-17  Luc Hermitte  <hermitte@free.fr>
	    Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/45713
	* include/std/bitset: Fix _GLIBCXX_BITSET_WORDS macro.
	* testsuite/23_containers/bitset/45713.cc: New.
	    

Co-Authored-By: Paolo Carlini <paolo.carlini@oracle.com>

From-SVN: r164388
2010-09-18 01:29:31 +00:00
Paolo Carlini
b5fbd147fe system_error (system_error::system_error(error_code), [...]): Fix for what() to return the NBTS recommended in the Note in 19.5.6.2/14.
2010-09-16  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/system_error (system_error::system_error(error_code),
	system_error(error_code, const string&), system_error(int, const
	error_category&), system_error(int, const error_category&,
	const string&)): Fix for what() to return the NBTS recommended in
	the Note in 19.5.6.2/14.
	* testsuite/19_diagnostics/system_error/cons-1.cc: Adjust.
	* testsuite/19_diagnostics/system_error/what-1.cc: Likewise.
	* testsuite/19_diagnostics/system_error/what-2.cc: Likewise.
	* testsuite/19_diagnostics/system_error/what-big.cc: Likewise.
	* testsuite/19_diagnostics/system_error/what-3.cc: Likewise.

	* testsuite/19_diagnostics/system_error/what-4.cc: Tidy includes.

From-SVN: r164339
2010-09-16 14:55:37 +00:00
François Dumont
619b56bce2 libstdc++.exp, ([check_v3_target_namedlocale]): Clean temporary source file once compiled.
2010-09-15  François Dumont  <francois.cppdevs@free.fr>

	* testsuite/lib/libstdc++.exp,([check_v3_target_namedlocale]):
	Clean temporary source file once compiled.

From-SVN: r164316
2010-09-15 20:54:48 +00:00
Paolo Carlini
9c69a45888 [multiple changes]
2010-09-15  Paolo Carlini  <paolo.carlini@oracle.com>

	* doc/xml/manual/prerequisites.xml: Update "C" library locale
	information prerequisites.

2010-09-15  François Dumont  <francois.cppdevs@free.fr>

	* testsuite/lib/libstdc++.exp, dg-options.exp
	([check_v3_target_namedlocale]): Take the name of the required locale.
	* testsuite/27_io/objects/wchar_t/9520.cc, 11.cc, 13.cc, 10.cc, 12.cc:
	Specify locale name to check.
	* testsuite/27_io/basic_streambuf/imbue/wchar_t/9322.cc, 13007-1.cc,
	13007-2.cc: Likewise.
	* testsuite/27_io/basic_streambuf/imbue/char/9322.cc, 13007-1.cc,
	13007-2.cc: Likewise.
	* testsuite/27_io/basic_ios/copyfmt/char/2.cc: Likewise.
	* testsuite/27_io/basic_stringbuf/imbue/wchar_t/9322.cc: Likewise.
	* testsuite/27_io/basic_stringbuf/imbue/char/9322.cc: Likewise.
	* testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/2.cc:
	Likewise.
	* testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc:
	Likewise.
	* testsuite/27_io/basic_filebuf/seekoff/wchar_t/1.cc, 2.cc:
	Likewise.
	* testsuite/27_io/basic_filebuf/imbue/wchar_t/13171-3.cc, 9322.cc,
	13582-2.cc, 2.cc, 13582-3.cc, 12868.cc, 14975-2.cc, 13007.cc: Likewise.
	* testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc, 13171-4.cc,
	9322.cc, 13582-2.cc, 2.cc, 14975-1.cc, 13007.cc, 13171-1.cc: Likewise.
	* testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-1.cc,
	11305-2.cc, 11305-3.cc, 11305-4.cc: Likewise.
	* testsuite/27_io/basic_filebuf/underflow/wchar_t/9520.cc, 1.cc, 2.cc,
	3.cc, 11389-1.cc, 4.cc, 11389-2.cc, 5.cc, 11389-3.cc, 11389-4.cc:
	Likewise.
	* testsuite/27_io/basic_filebuf/seekpos/wchar_t/9874.cc: Likewise.
	* testsuite/27_io/manipulators/extended/put_money/wchar_t/1.cc:
	Likewise.
	* testsuite/27_io/manipulators/extended/put_money/char/1.cc: Likewise.
	* testsuite/27_io/manipulators/extended/get_money/wchar_t/1.cc:
	Likewise.
	* testsuite/27_io/manipulators/extended/get_money/char/1.cc: Likewise.
	* testsuite/ext/stdio_sync_filebuf/wchar_t/12077.cc: Likewise.
	* testsuite/22_locale/money_put/put/wchar_t/1.cc, 2.cc, 3.cc,
	wrapped_locale.cc, wrapped_env.cc: Likewise.
	* testsuite/22_locale/money_put/put/char/1.cc, 2.cc, 3.cc, 9780-3.cc,
	wrapped_locale.cc, wrapped_env.cc: Likewise.
	* testsuite/22_locale/facet/2.cc: Likewise.
	* testsuite/22_locale/collate/hash/wchar_t/2.cc, wrapped_locale.cc,
	wrapped_env.cc: Likewise.
	* testsuite/22_locale/collate/hash/char/2.cc, wrapped_locale.cc,
	wrapped_env.cc: Likewise.
	* testsuite/22_locale/collate/compare/wchar_t/1.cc, 2.cc, 3.cc,
	wrapped_locale.cc, wrapped_env.cc: Likewise.
	* testsuite/22_locale/collate/compare/char/1.cc, 2.cc, 3.cc,
	wrapped_locale.cc, wrapped_env.cc: Likewise.
	* testsuite/22_locale/collate/transform/wchar_t/2.cc, 3.cc,
	wrapped_locale.cc, wrapped_env.cc: Likewise.
	* testsuite/22_locale/collate/transform/char/2.cc, 3.cc,
	wrapped_locale.cc, wrapped_env.cc: Likewise.
	* testsuite/22_locale/ctype/cons/char/wrapped_locale.cc,
	wrapped_env.cc: Likewise.
	* testsuite/22_locale/ctype/to/wchar_t/wrapped_locale.cc,
	wrapped_env.cc: Likewise.
	* testsuite/22_locale/ctype/to/char/wrapped_locale.cc, wrapped_env.cc:
	Likewise.
	* testsuite/22_locale/ctype/scan/wchar_t/wrapped_locale.cc,
	wrapped_env.cc: Likewise.
	* testsuite/22_locale/ctype/scan/char/wrapped_locale.cc,
	wrapped_env.cc: Likewise.
	* testsuite/22_locale/ctype/widen/wchar_t/2.cc, 3.cc,
	wrapped_locale.cc, wrapped_env.cc: Likewise.
	* testsuite/22_locale/ctype/widen/char/wrapped_locale.cc,
	wrapped_env.cc: Likewise.
	* testsuite/22_locale/ctype/narrow/wchar_t/3.cc, wrapped_locale.cc,
	wrapped_env.cc: Likewise.
	* testsuite/22_locale/ctype/narrow/char/wrapped_locale.cc,
	wrapped_env.cc: Likewise.
	* testsuite/22_locale/ctype/is/wchar_t/2.cc,wrapped_locale.cc,
	wrapped_env.cc: Likewise
	* testsuite/22_locale/ctype/is/char/2.cc, wrapped_locale.cc,
	wrapped_env.cc: Likewise.
	* testsuite/22_locale/time_put/put/wchar_t/2.cc, 3.cc, 4.cc, 6.cc,
	7.cc, 8.cc, wrapped_env.cc, wrapped_locale.cc, 17038.cc: Likewise.
	* testsuite/22_locale/time_put/put/char/2.cc, 3.cc, 4.cc, 6.cc,
	9780-1.cc, 7.cc, 8.cc, wrapped_env.cc, wrapped_locale.cc, 17038.cc:
	Likewise.
	* testsuite/22_locale/money_get/get/wchar_t/1.cc, 2.cc, 3.cc, 4.cc,
	wrapped_env.cc, 10.cc, 11528.cc, wrapped_locale.cc, 11.cc, 12.cc,
	13.cc, 15.cc, 16.cc, 17.cc, 18.cc: Likewise.
	* testsuite/22_locale/money_get/get/char/1.cc, 2.cc, 3.cc, 4.cc,
	wrapped_env.cc, 10.cc, 11528.cc, wrapped_locale.cc, 11.cc, 12.cc,
	13.cc, 15.cc, 16.cc, 17.cc, 18.cc: Likewise
	* testsuite/22_locale/num_put/put/wchar_t/1.cc, 3.cc, 5.cc,
	wrapped_env.cc, 20914.cc, wrapped_locale.cc, 20909.cc: Likewise.
	* testsuite/22_locale/num_put/put/char/1.cc, 3.cc, 5.cc, 9780-2.cc,
	wrapped_env.cc, 20914.cc, wrapped_locale.cc, 20909.cc: Likewise.
	* testsuite/22_locale/codecvt/unshift/wchar_t/2.cc, wrapped_locale.cc,
	3.cc, 4.cc, wrapped_env.cc: Likewise.
	* testsuite/22_locale/codecvt/unshift/char/wrapped_locale.cc,
	wrapped_env.cc: Likewise.
	testsuite/22_locale/codecvt/length/wchar_t/2.cc, wrapped_locale.cc,
	3.cc, 4.cc, 7.cc, wrapped_env.cc: Likewise.
	* testsuite/22_locale/codecvt/length/char/wrapped_locale.cc,
	wrapped_env.cc: Likewise.
	* testsuite/22_locale/codecvt/always_noconv/wchar_t/2.cc,
	wrapped_locale.cc, 3.cc, 4.cc, wrapped_env.cc: Likewise.
	* testsuite/22_locale/codecvt/always_noconv/char/wrapped_locale.cc,
	wrapped_env.cc: Likewise.
	* testsuite/22_locale/codecvt/encoding/wchar_t/2.cc, wrapped_locale.cc,
	3.cc, 4.cc, wrapped_env.cc: Likewise.
	* testsuite/22_locale/codecvt/encoding/char/wrapped_locale.cc,
	wrapped_env.cc: Likewise.
	* testsuite/22_locale/codecvt/in/wchar_t/2.cc, wrapped_locale.cc, 3.cc,
	4.cc, 7.cc, 8.cc, 9.cc, wrapped_env.cc: Likewise.
	* testsuite/22_locale/codecvt/in/char/wrapped_locale.cc,
	wrapped_env.cc: Likewise.
	* testsuite/22_locale/codecvt/max_length/wchar_t/2.cc,
	wrapped_locale.cc, 3.cc, 4.cc, wrapped_env.cc: Likewise.
	* testsuite/22_locale/codecvt/max_length/char/wrapped_locale.cc,
	wrapped_env.cc: Likewise.
	* testsuite/22_locale/codecvt/out/wchar_t/2.cc, wrapped_locale.cc,
	3.cc, 4.cc, 7.cc, wrapped_env.cc: Likewise.
	* testsuite/22_locale/codecvt/out/char/wrapped_locale.cc,
	wrapped_env.cc: Likewise.
	* testsuite/22_locale/moneypunct_byname/named_equivalence.cc: Likewise.
	* testsuite/22_locale/time_get/get_year/wchar_t/wrapped_locale.cc,
	wrapped_env.cc: Likewise.
	* testsuite/22_locale/time_get/get_year/char/wrapped_locale.cc,
	wrapped_env.cc: Likewise.
	* testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc,
	wrapped_locale.cc, wrapped_env.cc: Likewise.
	* testsuite/22_locale/time_get/get_monthname/char/2.cc,
	wrapped_locale.cc, wrapped_env.cc: Likewise.
	* testsuite/22_locale/time_get/date_order/wchar_t/wrapped_locale.cc,
	wrapped_env.cc: Likewise.
	* testsuite/22_locale/time_get/date_order/char/wrapped_locale.cc,
	wrapped_env.cc: Likewise.
	* testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc,
	wrapped_locale.cc, wrapped_env.cc: Likewise.
	* testsuite/22_locale/time_get/get_weekday/char/2.cc, 38081-1.cc,
	wrapped_locale.cc, 38081-2.cc, wrapped_env.cc: Likewise.
	* testsuite/22_locale/time_get/get_date/wchar_t/12750.cc, 26701.cc,
	2.cc, wrapped_locale.cc, 4.cc, wrapped_env.cc: Likewise.
	* testsuite/22_locale/time_get/get_date/char/12750.cc, 26701.cc,
	2.cc, wrapped_locale.cc, wrapped_env.cc: Likewise.
	* testsuite/22_locale/time_get/get_time/wchar_t/1.cc, 2.cc,
	wrapped_locale.cc, wrapped_env.cc: Likewise.
	* testsuite/22_locale/time_get/get_time/char/1.cc, 2.cc,
	wrapped_locale.cc, wrapped_env.cc: Likewise.
	* testsuite/22_locale/num_get/get/wchar_t/1.cc, 3.cc, 5.cc, 6.cc, 9.cc,
	wrapped_env.cc, wrapped_locale.cc: Likewise.
	* testsuite/22_locale/num_get/get/char/1.cc, 3.cc, 5.cc, 6.cc, 9.cc,
	wrapped_env.cc, wrapped_locale.cc: Likewise.
	* testsuite/22_locale/locale/cons/38368.cc, 2.cc, 4.cc, 5.cc, 7.cc,
	12658_thread-1.cc, 12658_thread-2.cc, 40184.cc, 29217.cc, 38365.cc:
	Likewise.
	* testsuite/22_locale/locale/global_locale_objects/14071.cc, 2.cc:
	Likewise.
	* testsuite/22_locale/moneypunct/40712.cc: Likewise.
	* testsuite/22_locale/moneypunct/members/wchar_t/2.cc,
	wrapped_locale.cc, wrapped_env.cc: Likewise.
	* testsuite/22_locale/moneypunct/members/char/2.cc, wrapped_locale.cc,
	wrapped_env.cc: Likewise.
	* testsuite/22_locale/messages_byname/named_equivalence.cc: Likewise.
	* testsuite/22_locale/numpunct_byname/named_equivalence.cc: Likewise.
	* testsuite/22_locale/messages/members/char/1.cc, 2.cc,
	wrapped_locale.cc, 3.cc, wrapped_env.cc: Likewise.
	* testsuite/22_locale/numpunct/members/wchar_t/2.cc, wrapped_locale.cc,
	wrapped_env.cc: Likewise.
	* testsuite/22_locale/numpunct/members/char/2.cc, wrapped_locale.cc,
	3.cc, wrapped_env.cc: Likewise.
	* testsuite/22_locale/collate_byname/named_equivalence.cc: Likewise.

From-SVN: r164300
2010-09-15 10:46:39 +00:00
Paolo Carlini
a5d39cb4a7 [multiple changes]
2010-09-14  Matt Austern  <austern@google.com>
	    Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/performance/21_strings/hash.cc: New.

2010-09-14  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/performance/21_strings/string_append.cc: Rename to...
	* testsuite/performance/21_strings/append-1.cc: ... this.
	* testsuite/performance/21_strings/string_append_2.cc: Rename to...
	* testsuite/performance/21_strings/append-2.cc: ... this.
	* testsuite/performance/21_strings/string_cons_input_iterator.cc:
	Rename to...
	* testsuite/performance/21_strings/cons_input_iterator.cc: ... this.
	* testsuite/performance/21_strings/string_copy_cons_and_dest.cc:
	Rename to...
	* testsuite/performance/21_strings/copy_cons_and_dest.cc: ... this.
	* testsuite/performance/21_strings/string_find.cc: Rename to...
	* testsuite/performance/21_strings/find.cc: ... this.

From-SVN: r164278
2010-09-14 10:27:36 +00:00
Paolo Carlini
fe09341996 4.cc: New.
2010-09-13  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/27_io/basic_filebuf/seekoff/char/4.cc: New.
	* testsuite/27_io/basic_filebuf/seekoff/wchar_t/4.cc: Likewise.

From-SVN: r164248
2010-09-13 15:12:31 +00:00
Jason Merrill
6d105d8db8 abi.exp: Add "libstdc++-abi/" to abi_check FAIL message.
* testsuite/libstdc++-abi/abi.exp: Add "libstdc++-abi/" to
	abi_check FAIL message.

From-SVN: r163916
2010-09-06 09:55:40 -04:00
François Dumont
d78301422a libstdc++.exp ([check_v3_target_debug_mode]): Fix so that it really detects when debug mode is activated.
2010-09-03  François Dumont <francois.cppdevs@free.fr>

        * testsuite/lib/libstdc++.exp ([check_v3_target_debug_mode]): Fix so
        that it really detects when debug mode is activated.
        * testsuite/util/debug/construct_neg.h, insert_neg.h, assign_neg.h:
        Remove, content moved...
        * testsuite/util/debug/checks.h: ... here. Modify checks to take the
	type of the container to test rather than an intermediate container
        type traits helper.
	* testsuite/23_containers/unordered_map/debug/insert1_neg.cc: Update to
	use dg-require-debug-mode when necessary and use new check functions.
	* testsuite/23_containers/unordered_map/debug/construct1_neg.cc: 
	Likewise.
	* testsuite/23_containers/unordered_map/debug/construct2_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_map/debug/insert2_neg.cc: Likewise.
	* testsuite/23_containers/unordered_map/debug/construct3_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_map/debug/insert3_neg.cc: Likewise.
	* testsuite/23_containers/unordered_map/debug/construct4_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_map/debug/insert4_neg.cc: Likewise.
	* testsuite/23_containers/multimap/debug/insert1_neg.cc: Likewise.
	* testsuite/23_containers/multimap/debug/construct1_neg.cc: Likewise.
	* testsuite/23_containers/multimap/debug/construct2_neg.cc: Likewise.
	* testsuite/23_containers/multimap/debug/insert2_neg.cc: Likewise.
	* testsuite/23_containers/multimap/debug/construct3_neg.cc: Likewise.
	* testsuite/23_containers/multimap/debug/insert3_neg.cc: Likewise.
	* testsuite/23_containers/multimap/debug/construct4_neg.cc: Likewise.
	* testsuite/23_containers/multimap/debug/insert4_neg.cc: Likewise.
	* testsuite/23_containers/set/debug/insert1_neg.cc: Likewise.
	* testsuite/23_containers/set/debug/construct1_neg.cc: Likewise.
	* testsuite/23_containers/set/debug/construct2_neg.cc: Likewise.
	* testsuite/23_containers/set/debug/insert2_neg.cc: Likewise.
	* testsuite/23_containers/set/debug/construct3_neg.cc: Likewise.
	* testsuite/23_containers/set/debug/insert3_neg.cc: Likewise.
	* testsuite/23_containers/set/debug/construct4_neg.cc: Likewise.
	* testsuite/23_containers/set/debug/insert4_neg.cc: Likewise.
	* testsuite/23_containers/unordered_multimap/debug/insert1_neg.cc: 
	Likewise.
	* testsuite/23_containers/unordered_multimap/debug/construct1_neg.cc: 
	Likewise.
	* testsuite/23_containers/unordered_multimap/debug/construct2_neg.cc: 
	Likewise.
	* testsuite/23_containers/unordered_multimap/debug/insert2_neg.cc: 
	Likewise.
	* testsuite/23_containers/unordered_multimap/debug/construct3_neg.cc: 
	Likewise.
	* testsuite/23_containers/unordered_multimap/debug/insert3_neg.cc: 
	Likewise.
	* testsuite/23_containers/unordered_multimap/debug/construct4_neg.cc: 
	Likewise.
	* testsuite/23_containers/unordered_multimap/debug/insert4_neg.cc:
	Likewise.
	* testsuite/23_containers/vector/debug/assign1_neg.cc: Likewise.
	* testsuite/23_containers/vector/debug/construct1_neg.cc: Likewise.
	* testsuite/23_containers/vector/debug/construct2_neg.cc: Likewise.
	* testsuite/23_containers/vector/debug/assign2_neg.cc: Likewise.
	* testsuite/23_containers/vector/debug/construct3_neg.cc: Likewise.
	* testsuite/23_containers/vector/debug/assign3_neg.cc: Likewise.
	* testsuite/23_containers/vector/debug/construct4_neg.cc: Likewise.
	* testsuite/23_containers/vector/debug/assign4_neg.cc: Likewise.
	* testsuite/23_containers/vector/debug/insert1_neg.cc: Likewise.
	* testsuite/23_containers/vector/debug/insert2_neg.cc: Likewise.
	* testsuite/23_containers/vector/debug/insert3_neg.cc: Likewise.
	* testsuite/23_containers/vector/debug/insert4_neg.cc: Likewise.
	* testsuite/23_containers/unordered_set/debug/insert1_neg.cc: Likewise.
	* testsuite/23_containers/unordered_set/debug/construct1_neg.cc: 
	Likewise.
	* testsuite/23_containers/unordered_set/debug/construct2_neg.cc: 
	Likewise.
	* testsuite/23_containers/unordered_set/debug/insert2_neg.cc: Likewise.
	* testsuite/23_containers/unordered_set/debug/construct3_neg.cc: 
	Likewise.
	* testsuite/23_containers/unordered_set/debug/insert3_neg.cc: Likewise.
	* testsuite/23_containers/unordered_set/debug/construct4_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_set/debug/insert4_neg.cc: Likewise.
	* testsuite/23_containers/deque/debug/assign1_neg.cc: Likewise.
	* testsuite/23_containers/deque/debug/construct1_neg.cc: Likewise.
	* testsuite/23_containers/deque/debug/construct2_neg.cc: Likewise.
	* testsuite/23_containers/deque/debug/assign2_neg.cc: Likewise.
	* testsuite/23_containers/deque/debug/construct3_neg.cc: Likewise.
	* testsuite/23_containers/deque/debug/assign3_neg.cc: Likewise.
	* testsuite/23_containers/deque/debug/construct4_neg.cc: Likewise.
	* testsuite/23_containers/deque/debug/assign4_neg.cc: Likewise.
	* testsuite/23_containers/deque/debug/insert1_neg.cc: Likewise.
	* testsuite/23_containers/deque/debug/insert2_neg.cc: Likewise.
	* testsuite/23_containers/deque/debug/insert3_neg.cc: Likewise.
	* testsuite/23_containers/deque/debug/insert4_neg.cc: Likewise.
	* testsuite/23_containers/multiset/debug/insert1_neg.cc: Likewise.
	* testsuite/23_containers/multiset/debug/construct1_neg.cc: Likewise.
	* testsuite/23_containers/multiset/debug/construct2_neg.cc: Likewise.
	* testsuite/23_containers/multiset/debug/insert2_neg.cc: Likewise.
	* testsuite/23_containers/multiset/debug/construct3_neg.cc: Likewise.
	* testsuite/23_containers/multiset/debug/insert3_neg.cc: Likewise.
	* testsuite/23_containers/multiset/debug/construct4_neg.cc: Likewise.
	* testsuite/23_containers/multiset/debug/insert4_neg.cc: Likewise.
	* testsuite/23_containers/list/debug/assign1_neg.cc: Likewise.
	* testsuite/23_containers/list/debug/construct1_neg.cc: Likewise.
	* testsuite/23_containers/list/debug/construct2_neg.cc: Likewise.
	* testsuite/23_containers/list/debug/assign2_neg.cc: Likewise.
	* testsuite/23_containers/list/debug/construct3_neg.cc: Likewise.
	* testsuite/23_containers/list/debug/assign3_neg.cc: Likewise.
	* testsuite/23_containers/list/debug/construct4_neg.cc: Likewise.
	* testsuite/23_containers/list/debug/assign4_neg.cc: Likewise.
	* testsuite/23_containers/list/debug/insert1_neg.cc: Likewise.
	* testsuite/23_containers/list/debug/insert2_neg.cc: Likewise.
	* testsuite/23_containers/list/debug/insert3_neg.cc: Likewise.
	* testsuite/23_containers/list/debug/insert4_neg.cc: Likewise.
	* testsuite/23_containers/unordered_multiset/debug/insert1_neg.cc: 
	Likewise.
	* testsuite/23_containers/unordered_multiset/debug/construct1_neg.cc: 
	Likewise.
	* testsuite/23_containers/unordered_multiset/debug/construct2_neg.cc: 
	Likewise.
	* testsuite/23_containers/unordered_multiset/debug/insert2_neg.cc: 
	Likewise.
	* testsuite/23_containers/unordered_multiset/debug/construct3_neg.cc: 
	Likewise.
	* testsuite/23_containers/unordered_multiset/debug/insert3_neg.cc: 
	Likewise.
	* testsuite/23_containers/unordered_multiset/debug/construct4_neg.cc: 
	Likewise.
	* testsuite/23_containers/unordered_multiset/debug/insert4_neg.cc: 
	Likewise.
	* testsuite/23_containers/map/debug/insert1_neg.cc: Likewise.
	* testsuite/23_containers/map/debug/construct1_neg.cc: Likewise.
	* testsuite/23_containers/map/debug/construct2_neg.cc: Likewise.
	* testsuite/23_containers/map/debug/insert2_neg.cc: Likewise.
	* testsuite/23_containers/map/debug/construct3_neg.cc: Likewise.
	* testsuite/23_containers/map/debug/insert3_neg.cc: Likewise.
	* testsuite/23_containers/map/debug/construct4_neg.cc: Likewise.
	* testsuite/23_containers/map/debug/insert4_neg.cc: Likewise.

	* testsuite/23_containers/unordered_map/debug/cont_traits.h: Remove.
	* testsuite/23_containers/unordered_map/debug/debug_cont_traits.h:
	Likewise.
	* testsuite/23_containers/multimap/debug/cont_traits.h: Likewise.
	* testsuite/23_containers/multimap/debug/debug_cont_traits.h: Likewise.
	* testsuite/23_containers/set/debug/cont_traits.h: Likewise.
	* testsuite/23_containers/set/debug/debug_cont_traits.h: Likewise.
	* testsuite/23_containers/unordered_multimap/debug/cont_traits.h:
	Likewise.
	* testsuite/23_containers/unordered_multimap/debug/
	debug_cont_traits.h: Likewise.
	* testsuite/23_containers/vector/debug/cont_traits.h: Likewise.
	* testsuite/23_containers/vector/debug/debug_cont_traits.h: Likewise.
	* testsuite/23_containers/unordered_set/debug/cont_traits.h: Likewise.
	* testsuite/23_containers/unordered_set/debug/debug_cont_traits.h:
	Likewise.
	* testsuite/23_containers/deque/debug/cont_traits.h: Likewise.
	* testsuite/23_containers/deque/debug/debug_cont_traits.h: Likewise.
	* testsuite/23_containers/multiset/debug/cont_traits.h: Likewise.
	* testsuite/23_containers/multiset/debug/debug_cont_traits.h: Likewise.
	* testsuite/23_containers/list/debug/cont_traits.h: Likewise.
	* testsuite/23_containers/list/debug/debug_cont_traits.h: Likewise.
	* testsuite/23_containers/unordered_multiset/debug/cont_traits.h: 
	Likewise.
	* testsuite/23_containers/unordered_multiset/debug/
	debug_cont_traits.h: Likewise.
	* testsuite/23_containers/map/debug/cont_traits.h: Likewise.
	* testsuite/23_containers/map/debug/debug_cont_traits.h: Likewise.

	* testsuite/21_strings/basic_string/element_access/char: Tidy.
	* testsuite/21_strings/basic_string/element_access/wchar_t: Likewise.

From-SVN: r163837
2010-09-03 18:10:46 +00:00
Paolo Carlini
ba6a601c1a remove_freed.cc: Fix test01 return type to void.
2010-08-31  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/23_containers/forward_list/operations/remove_freed.cc:
	Fix test01 return type to void.
	* testsuite/util/exception/safety.h: Avoid -Wall -m32 warnings.
	* testsuite/util/replacement_memory_operators.h: Likewise.

From-SVN: r163684
2010-08-31 17:24:39 +00:00
Paolo Carlini
1f5ca1a15c [multiple changes]
2010-08-29  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/23_containers/bitset/invalidation: Move...
	* testsuite/23_containers/bitset/debug/invalidation: ... here.
	* testsuite/23_containers/deque/invalidation: Move...
	* testsuite/23_containers/deque/debug/invalidation: ... here.
	* testsuite/23_containers/list/invalidation: Move...
	* testsuite/23_containers/list/debug/invalidation: ... here.
	* testsuite/23_containers/map/invalidation: Move...
	* testsuite/23_containers/map/debug/invalidation: ... here.
	* testsuite/23_containers/multimap/invalidation: Move...
	* testsuite/23_containers/multimap/debug/invalidation: ... here.
	* testsuite/23_containers/set/invalidation: Move...
	* testsuite/23_containers/set/debug/invalidation: ... here.
	* testsuite/23_containers/multiset/invalidation: Move...
	* testsuite/23_containers/multiset/debug/invalidation: ... here.
	* testsuite/23_containers/vector/invalidation: Move...
	* testsuite/23_containers/vector/debug/invalidation: ... here.

2010-08-29  François Dumont  <francois.cppdevs@free.fr>

        * include/bits/stl_algobase.h (_Iter_base):  Move...
        * include/bits/stl_iterator_base_types.h: ...here.
        * include/debug/functions.h (__check_valid_range, __check_string,
	__check_sorted): Fix to not depend on _GLIBCXX_DEBUG; include
	formatter.h and use formatting macros for a consistent debug result.
        * include/debug/formatter.h (__check_singular): Declare; do not
	include debug.h.
        * include/debug/debug.h: Do not include formatter.h.
        * include/debug/safe_iterator.h (_Safe_iterator::_Base_Iterator)
        rename to iterator_type.
	(__gnu_debug::__base): Add.
        * include/debug/set.h: Use everywhere __gnu_debug::__base once
	iterator range valided.
        * include/debug/unordered_map: Likewise.
        * include/debug/multiset.h: Likewise.
        * include/debug/vector: Likewise.
        * include/debug/unordered_set: Likewise.
        * include/debug/deque: Likewise.
        * include/debug/map.h: Likewise.
        * include/debug/string: Likewise.
        * include/debug/list: Likewise.
        * include/debug/multimap.h: Likewise.
        * testsuite/23_containers/util/debug/assign_neg.h: New test cases on
        debug checks performed on container assign operation.
        * testsuite/23_containers/util/debug/construct_neg.h: New test cases
        on debug checks on constructors.
        * testsuite/23_containers/util/debug/insert_neg.h: New test cases on
        debug checks performed on container insert operations.
        * testsuite/23_containers/unordered_map/debug/cont_traits.h,
        debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
        insert3_neg.cc, insert4_neg.cc: New.
        * testsuite/23_containers/multimap/debug/cont_traits.h,
        debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
        insert3_neg.cc, insert4_neg.cc: Likewise.
        * testsuite/23_containers/set/debug/cont_traits.h,
        debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
        insert3_neg.cc, insert4_neg.cc: Likewise.
        * testsuite/23_containers/unordered_multimap/debug/cont_traits.h,
        debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
        insert3_neg.cc, insert4_neg.cc: Likewise.
        * testsuite/23_containers/unordered_set/debug/cont_traits.h,
        debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
        insert3_neg.cc, insert4_neg.cc: Likewise.
        * testsuite/23_containers/multiset/debug/cont_traits.h,
        debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
        insert3_neg.cc, insert4_neg.cc: Likewise.
        * testsuite/23_containers/unordered_multiset/debug/cont_traits.h,
        debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
        insert3_neg.cc, insert4_neg.cc: Likewise.
        * testsuite/23_containers/map/debug/cont_traits.h,
        debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
        insert3_neg.cc, insert4_neg.cc: Likewise.
        * testsuite/23_containers/vector/debug/cont_traits.h,
        debug_cont_traits.h, assign1_neg.cc, assign2_neg.cc, assign3_neg.cc,
        assign4_neg.cc, construct1_neg.cc, construct2_neg.cc,
        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
        insert3_neg.cc, insert4_neg.cc: Likewise.
        * testsuite/23_containers/deque/debug/cont_traits.h,
        debug_cont_traits.h, assign1_neg.cc, assign2_neg.cc, assign3_neg.cc,
        assign4_neg.cc, construct1_neg.cc, construct2_neg.cc,
        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
        insert3_neg.cc, insert4_neg.cc: Likewise.
	* testsuite/23_containers/list/debug/cont_traits.h,
        debug_cont_traits.h, assign1_neg.cc, assign2_neg.cc, assign3_neg.cc,
        assign4_neg.cc, construct1_neg.cc, construct2_neg.cc,
        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
        insert3_neg.cc, insert4_neg.cc: Likewise.
        * testsuite/performance/23_containers/range_construct/
	list_construct1.cc: New, validate performance impact of the patch
	on the debug mode.
        * testsuite/performance/23_containers/range_construct/
	list_construct2.cc: Likewise.
        * testsuite/performance/23_containers/range_construct/
	vector_construct.cc: Likewise.
        * testsuite/performance/23_containers/range_construct/
	deque_construct.cc: Likewise.

From-SVN: r163628
2010-08-29 17:39:00 +00:00
Jonathan Wakely
73571bf1e2 re PR libstdc++/45283 (performance/30_threads/future/polling.cc fails at compile time)
2010-08-14  Jonathan Wakely  <jwakely.gcc@gmail.com>

	PR libstdc++/45283
	* testsuite/performance/30_threads/future/polling.cc: Replace calls to
	shared_future::is_ready.

From-SVN: r163250
2010-08-14 21:00:55 +01:00
Paolo Carlini
7d74619b73 dr1189.cc: Move to...
2010-08-13  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/23_containers/unordered_map/dr1189.cc: Move to...
	* testsuite/23_containers/unordered_map/hash_policy/dr1189.cc:
	... here.
	* testsuite/23_containers/unordered_set/dr1189.cc: Move to...
	* testsuite/23_containers/unordered_set/hash_policy/dr1189.cc:
	... here.
	* testsuite/23_containers/unordered_multimap/dr1189.cc: Move to...
	* testsuite/23_containers/unordered_multimap/hash_policy/dr1189.cc:
	... here.
	* testsuite/23_containers/unordered_multiset/dr1189.cc: Move to...
	* testsuite/23_containers/unordered_multiset/hash_policy/dr1189.cc:
	... here.

	* testsuite/23_containers/unordered_set/hash_policy/26132.cc: New.

From-SVN: r163224
2010-08-13 13:08:09 +00:00
Kostya Serebryany
be335b18a9 c++config (_GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE, [...]): Add.
2010-08-12  Kostya Serebryany <kcc@google.com>
	    Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/c++config (_GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE,
	_GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER): Add.
	* src/ios_init.cc (ios_base::Init::~Init): Decorate with the
	latter.
	* include/tr1_impl/boost_sp_counted_base.h: Likewise.
	* include/ext/rc_string_base.h: Likewise.
	* include/bits/locale_classes.h: Likewise.
	* include/bits/basic_string.h: Likewise.
	* include/bits/ios_base.h: Likewise.
	* testsuite/27_io/ios_base/cons/assign_neg.cc: Adjust dg-error
	line number.
	* testsuite/27_io/ios_base/cons/copy_neg.cc: Likewise.
	* testsuite/ext/profile/mutex_extensions.cc: Likewise.

Co-Authored-By: Paolo Carlini <paolo.carlini@oracle.com>

From-SVN: r163210
2010-08-12 22:56:59 +00:00
Paolo Carlini
afb767b41f hashtable.h (_Hashtable<>::erase(const key_type&)): Use std::__addressof.
2010-08-11  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/hashtable.h (_Hashtable<>::erase(const key_type&)):
	Use std::__addressof.

	* include/bits/forward_list.tcc (forward_list<>::remove): Deal
	correctly with &__tmp->_M_value == &__val.
	* testsuite/23_containers/forward_list/operations/remove_freed.cc:
	New.

From-SVN: r163178
2010-08-11 23:59:35 +00:00
Paolo Carlini
633e8e192b stl_algo.h (shuffle): Change signature consistently with random_shuffle (US 121).
2010-08-11  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/stl_algo.h (shuffle): Change signature consistently
	with random_shuffle (US 121).
	* include/bits/algorithmfwd.h: Adjust.
	* testsuite/25_algorithms/shuffle/requirements/
	explicit_instantiation/2.cc: Likewise.
	* testsuite/25_algorithms/shuffle/requirements/
	explicit_instantiation/pod.cc: Likewise.

From-SVN: r163102
2010-08-11 17:10:04 +00:00