Commit Graph

6149 Commits

Author SHA1 Message Date
Paolo Carlini
6f0398bb14 istream.tcc (basic_istream<>::operator>>(short&), [...]): Implement resolution of DR 696, [Ready] in Frankfurt.
2009-07-16  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/istream.tcc (basic_istream<>::operator>>(short&),
	basic_istream<>::operator>>(int&)): Implement resolution of DR 696,
	[Ready] in Frankfurt.
	* include/tr1_impl/regex (regex_traits<>::value): Adjust.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/dr696.cc:
	New.
	* testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/dr696.cc:
	Likewise.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/13.cc:
	Adjust.
	* testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/13.cc:
	Likewise.
	* doc/xml/manual/intro.xml: Add an entry for DR 696.

	* include/bits/istream.tcc: Minor clean-up to the initializers of the
	__err locals.
	* include/bits/ostream.tcc: Likewise.
	* src/compatibility.cc: Likewise.
	* src/istream.cc: Likewise.

From-SVN: r149704
2009-07-16 12:41:03 +00:00
Paolo Carlini
026ec377e9 re PR c++/36628 ([c++0x] incorrect decltype() handling of conditional operator)
2009-07-12  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/type_traits (common_type): Remove workaround for
	PR36628, now fixed.

From-SVN: r149537
2009-07-12 23:25:29 +00:00
Richard Sandiford
33cde5161f re PR testsuite/40699 (All sparcv9 libjava execution tests fail on Solaris 11/SPARC)
gcc/testsuite/
	PR testsuite/40699
	PR testsuite/40707
	PR testsuite/40709
	* lib/gcc-defs.exp, lib/target-libpath.exp, lib/objc.exp,
	lib/gfortran.exp, lib/g++.exp, lib/obj-c++.exp, lib/c-torture.exp,
	lib/gcc-dg.exp, lib/gnat.exp, g++.dg/compat/compat.exp,
	g++.dg/compat/struct-layout-1.exp: Revert 2009-06-30 commit.

libstdc++-v3/
	PR testsuite/40699
	PR testsuite/40707
	PR testsuite/40709
	* testsuite/lib/libstdc++.exp: Revert 2009-06-30 commit.

libjava/
	PR testsuite/40699
	PR testsuite/40707
	PR testsuite/40709
	* testsuite/lib/libjava.exp: Revert 2009-06-30 commit.

libgomp/
	PR testsuite/40699
	PR testsuite/40707
	PR testsuite/40709
	* testsuite/lib/libgomp.exp: Revert 2009-07-02 and 2009-06-30 commits.
	* testsuite/libgomp.c/c.exp, testsuite/libgomp.c++/c++.exp,
	testsuite/libgomp.fortran/fortran.exp: Revert 2009-06-30 commits.

libffi/
	PR testsuite/40699
	PR testsuite/40707
	PR testsuite/40709
	* testsuite/lib/libffi-dg.exp: Revert 2009-07-02, 2009-07-01 and
	2009-06-30 commits.

libmudflap/
	PR testsuite/40699
	PR testsuite/40707
	PR testsuite/40709
	* testsuite/lib/libmudflap.exp: Revert 2009-06-30 commit.

From-SVN: r149508
2009-07-11 06:10:49 +00:00
Janis Johnson
6eba227cb5 Fix typos in previous ChangeLog entry
From-SVN: r149421
2009-07-09 16:45:47 +00:00
Janis Johnson
23862bec3e re PR libstdc++/40691 (bug in logical not operator for valarray used with slice)
PR libstdc++/40691
	* include/bugs/valarray-after.h (_Expr::operator!): Fix return type.
	* testsuite/26_numerics/valarray/40691.cc: New test.

From-SVN: r149393
2009-07-08 22:26:50 +00:00
Benjamin Kosnik
8207d787b5 3.cc: Add copyright.
2009-07-06  Benjamin Kosnik  <bkoz@redhat.com>

	*  testsuite/21_strings/c_strings/wchar_t/3.cc: Add copyright.
	*  testsuite/21_strings/c_strings/char/3.cc: Same.

From-SVN: r149300
2009-07-06 22:44:58 +00:00
Jason Merrill
62c99ce475 vmi_class_type_info.cc (__do_dyncast): Use src2dst hint to defer searching bases that don't overlap the desired address.
* libsupc++/vmi_class_type_info.cc (__do_dyncast): Use src2dst hint
	to defer searching bases that don't overlap the desired address.

From-SVN: r149297
2009-07-06 18:13:51 -04:00
Joseph Myers
aded0ed0dd *
testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stod.cc,
	testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stof.cc,
	testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoi.cc,
	testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stol.cc,
	testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stold.cc,
	testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoll.cc,
	testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoul.cc,
	testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoull.cc,
	testsuite/21_strings/basic_string/numeric_conversions/wchar_t/to_wstring.cc,
	testsuite/ext/vstring/element_access/char/front_back.cc,
	testsuite/ext/vstring/element_access/wchar_t/front_back.cc,
	testsuite/ext/vstring/init-list.cc,
	testsuite/ext/vstring/moveable.cc,
	testsuite/ext/vstring/requirements/citerators.cc,
	testsuite/ext/vstring/requirements/explicit_instantiation/char16_t/1.cc,
	testsuite/ext/vstring/requirements/explicit_instantiation/char32_t/1.cc:
	Use dg-require-string-conversions.

From-SVN: r149260
2009-07-05 18:59:29 +01:00
Richard Sandiford
b30bfd402f gcc-defs.exp (gcc-set-multilib-library-path): Delete.
gcc/testsuite/
	* lib/gcc-defs.exp (gcc-set-multilib-library-path): Delete.
	* lib/target-libpath.exp (ld_library_path_vars): New variable.
	(init_ld_library_path_env_vars): New function, replacing the
	orig_*_saved assignments.  Call it after defining it.
	(set_ld_library_path_env_vars): Rewrite to use ld_library_path_vars.
	(restore_ld_library_path_env_vars): Likewise.
	(add_path, find_libgcc_s): New functions.
	* lib/objc.exp (objc_init): Use find_libgcc_s instead of
	gcc-set-multilib-library-path.
	(objc_target_compile): Don't add "." to ld_library_path.
	Use add_path.
	* lib/gfortran.exp (gfortran_link_flags): Don't add "." to
	ld_library_path.  Use add_path.  Use find_libgcc_s instead of
	gcc-set-multilib-library-path.
	* lib/g++.exp (g++_link_flags): Likewise.
	* lib/obj-c++.exp (obj-c++_link_flags): Likewise.
	* lib/c-torture.exp: Do not manipulate ld_library_path at the
	top level; do it...
	(c-torture-execute): ...here instead.  Use $ld_library_path_multilib
	to tell when this needs to happen.  Use find_libgcc_s instead of
	gcc-set-multilib-library-path.
	* lib/gcc-dg.exp: Likewise.
	* lib/gnat.exp (gnat_target_compile): Don't add "." to ld_library_path.
	* g++.dg/compat/compat.exp (alt_ld_library_path): Don't add "."
	unless it is in $ALT_LD_LIBRARY_PATH.
	* g++.dg/compat/struct-layout-1.exp (alt_ld_library_path): Likewise.

libffi/
	* testsuite/lib/libffi-dg.exp (libffi-init): Don't add "."
	to ld_library_path.  Use add_path.  Add just find_libgcc_s
	to ld_library_path, not every libgcc multilib directory.

libgomp/
	* testsuite/lib/libgomp.exp (libgomp_init): Don't add "." to
	ld_library_path.  Use add_path.  Add just find_libgcc_s to
	ld_library_path, not every libgcc multilib directory.
	* testsuite/libgomp.c/c.exp (ld_library_path): Don't call
	gcc-set-multilib-library-path; rely on $always_ld_library_path instead.
	* testsuite/libgomp.c++/c++.exp (ld_library_path): Likewise.
	Use add_path.
	* testsuite/libgomp.fortran/fortran.exp (ld_library_path): Likewise.

libjava/
	* testsuite/lib/libjava.exp (libjava_init): Just add
	find_libgcc_s to libjava_libgcc_s_path, rather than every
	libgcc multilib directory.
	(libjava_arguments): Explain why we add "." to ld_library_path.
	(gcj_invoke, exec_gij, libjava_invoke): Use add_path.

libmudflap/
	* testsuite/lib/libmudflap.exp (libmudflap-init): Don't add "."
	to ld_library_path.  Use add_path.  Add just find_libgcc_s to
	ld_library_path, not every libgcc multilib directory.

libstdc++-v3/
	* testsuite/lib/libstdc++.exp (libstdc++_init): Don't add "."
	to ld_library_path.  Use add_path.  Add just find_libgcc_s to
	ld_library_path, not every libgcc multilib directory.

From-SVN: r149113
2009-06-30 18:37:57 +00:00
Paolo Carlini
a0560e75a7 re PR libstdc++/40600 (pair& operator=(pair&& __p) doesn't work without inlining)
2009-06-30  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/40600
	* testsuite/25_algorithms/minmax/2.cc: Fix consistently with
	std::minmax return type.
	* testsuite/25_algorithms/minmax/3.cc: Likewise.

From-SVN: r149094
2009-06-30 12:09:57 +00:00
Paolo Carlini
0dca215363 re PR libstdc++/40511 (Bootstrap Failure in stage3: c++locale - Recent SVN)
2009-06-30  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/40511
	* config/locale/gnu/c_locale.cc: Don't use LC_CTYPE_MASK together
	with glibc2.2.x.

From-SVN: r149089
2009-06-30 10:45:54 +00:00
Paolo Carlini
462ac91e72 2009-06-29 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/random.tcc
	(linear_congruential_engine<>::seed(seed_seq&)): Use uint_least32_t
	as array type.

From-SVN: r149078
2009-06-30 01:25:52 +00:00
Paolo Carlini
b94f4bef8b random.h (__mod(_Tp)): Use defaults.
2009-06-29  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/random.h (__mod(_Tp)): Use defaults.
	(struct _Mod): Adjust template parameters.
	(linear_congruential_engine<>::operator()()): Adjust.
	(typedef _UInt32Type): Remove.
	(mersenne_twister_engine<>::initialization_multiplier): Fix type.
	* include/bits/random.tcc (struct _Mod): Adjust template parameters.
	(linear_congruential_engine<>::seed(result_type)): Adjust __mod
	calls.
	(mersenne_twister_engine<>::seed(result_type)): Likewise.
	(mersenne_twister_engine<>::seed(seed_seq&)): Likewise.
	(subtract_with_carry_engine<>::seed(result_type)): Likewise.
	(subtract_with_carry_engine<>::seed(seed_seq&)): Likewise.
	(seed_seq::seed_seq(std::initializer_list<>)): Likewise.
	(seed_seq::seed_seq(_InputIterator, _InputIterator)): Likewise.
	(seed_seq::generate(_RandomAccessIterator, _RandomAccessIterator)):
	Likewise.

	* include/bits/random.tcc
	(mersenne_twister_engine<>::seed(result_type)): Fix i usage in the
	formula (i mod n).
	(mersenne_twister_engine<>::seed(seed_seq&)): Use uint_least32_t
	as array type.
	(subtract_with_carry_engine<>::seed(seed_seq&)): Likewise; fix array
	size.
	(subtract_with_carry_engine<>::seed(result_type)): Fix; also use
	uint_least32_t.

From-SVN: r149074
2009-06-30 00:43:21 +00:00
Jonathan Wakely
c8ee2bfd79 future (shared_future): Adjust doxygen comment.
2009-06-24  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* include/std/future (shared_future): Adjust doxygen comment.

From-SVN: r148895
2009-06-24 08:13:17 +01:00
Jonathan Wakely
27f41cfea5 re PR libstdc++/40297 ([C++0x] debug mode vs atomics)
2009-06-24  Jonathan Wakely  <jwakely.gcc@gmail.com>

	PR libstdc++/40297
	* include/bits/atomic_0.h: Reverse debug assertions.
	* include/bits/atomic_2.h: Likewise.

From-SVN: r148893
2009-06-24 08:06:17 +01:00
DJ Delorie
7acf4da6f9 MAINTAINERS: Add myself as mep maintainer.
[toplevel]

	* MAINTAINERS: Add myself as mep maintainer.

[gcc]

	Add MeP port.
	* config.gcc: Add mep support.
	* recog.c: Resurrect validate_replace_rtx_subexp().
	* recog.h: Likewise.
	* config/mep/: Add new port:
	* config/mep/constraints.md: New file.
	* config/mep/default.h: New file.
	* config/mep/intrinsics.h: New file.
	* config/mep/intrinsics.md: New file.
	* config/mep/ivc2-template.h: New file.
	* config/mep/mep-c5.cpu: New file.
	* config/mep/mep-core.cpu: New file.
	* config/mep/mep-default.cpu: New file.
	* config/mep/mep-ext-cop.cpu: New file.
	* config/mep/mep-intrin.h: New file.
	* config/mep/mep-ivc2.cpu: New file.
	* config/mep/mep-lib1.asm: New file.
	* config/mep/mep-lib2.c: New file.
	* config/mep/mep-pragma.c: New file.
	* config/mep/mep-protos.h: New file.
	* config/mep/mep-tramp.c: New file.
	* config/mep/mep.c: New file.
	* config/mep/mep.cpu: New file.
	* config/mep/mep.h: New file.
	* config/mep/mep.md: New file.
	* config/mep/mep.opt: New file.
	* config/mep/predicates.md: New file.
	* config/mep/t-mep: New file.

[gcc/testsuite]

	Add MeP port.
	* lib/target-supports.exp: Add mep support (no profiling).

[libgcc]

	Add MeP port.
	* config.host: Add mep support.

[libstdc++-v3]

	Add MeP port.
	* configure.host: Add mep support.

From-SVN: r148890
2009-06-24 00:16:25 -04:00
Benjamin Kosnik
3259554a05 user.cfg.in (PREDEFINED): Add _GLIBCXX_ATOMIC_BUILTINS_*.
2009-06-23  Benjamin Kosnik  <bkoz@redhat.com>

	* doc/doxygen/user.cfg.in (PREDEFINED): Add _GLIBCXX_ATOMIC_BUILTINS_*.
	(INPUT): Add future.
	* include/std/future: Adjust markup.
	* testsuite/30_threads/shared_future/cons/assign_neg.cc: Adjust
	line numbers.
	* testsuite/30_threads/unique_future/cons/assign_neg.cc: Same.
	* testsuite/30_threads/unique_future/cons/copy_neg.cc: Same.
	* testsuite/30_threads/promise/cons/assign_neg.cc: Same.
	* testsuite/30_threads/promise/cons/copy_neg.cc: Same.

From-SVN: r148883
2009-06-23 23:24:20 +00:00
Jonathan Wakely
2ea259393d shared_ptr.h: Do not swap rvalues.
2009-06-23  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* include/bits/shared_ptr.h: Do not swap rvalues.
	* testsuite/20_util/owner_less/cmp.cc: Add missing test variables.
	* testsuite/20_util/shared_ptr/comparison/cmp.cc: Likewise.
	* testsuite/20_util/shared_ptr/comparison/less.cc: Likewise.
	* testsuite/20_util/weak_ptr/observers/owner_before.cc: Likewise.
	* testsuite/20_util/tuple/swap.cc: Likewise.

From-SVN: r148880
2009-06-23 23:33:17 +01:00
Jonathan Wakely
79e2c7b01c macros.h: Replace @tbd with valid doxygen tag @todo.
2009-06-23  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* include/debug/macros.h: Replace @tbd with valid doxygen tag @todo.
	* include/std/ratio: Typo in comment.

From-SVN: r148861
2009-06-23 18:51:48 +01:00
Paolo Carlini
7309083f99 re PR libstdc++/40518 (data races when calling std::string::erase() on empty string)
2009-06-23  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/40518
	* include/bits/basic_string.h (basic_string<>::_Rep::
	_M_set_length_and_sharable): Do not write the empty rep.
	(basic_string<>::erase(iterator, iterator)): Likewise,
	move out of line...
	* include/bits/basic_string.tcc: ... here.

From-SVN: r148850
2009-06-23 12:36:43 +00:00
Paolo Carlini
c681c82917 testsuite_common_types.h (bitwise_operators, [...]): Initialize a and b.
2009-06-22  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/util/testsuite_common_types.h (bitwise_operators,
	bitwise_assignment_operators): Initialize a and b.
	(struct has_bitwise_operators): Do not call the latter.
	* testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Adjust
	dg-error line numbers.
	* testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
	* testsuite/29_atomics/atomic/cons/assign_neg.cc: Likewise.
	* testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.

From-SVN: r148809
2009-06-22 16:49:57 +00:00
Paolo Carlini
b959d63702 1.cc: Mark test as possibly unused.
2009-06-22  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/23_containers/list/invalidation/1.cc: Mark test as
	possibly unused.
	* testsuite/23_containers/list/invalidation/2.cc: Likewise.
	* testsuite/23_containers/list/invalidation/3.cc: Likewise.
	* testsuite/23_containers/list/invalidation/4.cc: Likewise.

From-SVN: r148801
2009-06-22 14:57:23 +00:00
Jonathan Wakely
c910ceff6a future: New.
2009-06-21  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* include/std/future: New.
	* include/Makefile.am: Add.
	* include/Makefile.in: Regenerate.
	* src/future.cc: New.
	* src/Makefile.am: Add.
	* src/Makefile.in: Regenerate.
	* config/abi/pre/gnu.ver: Add export.
	* testsuite/30_threads/headers/future/std_c++0x_neg.cc: New.
	* testsuite/30_threads/headers/future/types_std_c++0x.cc: New.
	* testsuite/30_threads/packaged_task/cons/1.cc: New.
	* testsuite/30_threads/packaged_task/cons/2.cc: New.
	* testsuite/30_threads/packaged_task/cons/assign_neg.cc: New.
	* testsuite/30_threads/packaged_task/cons/copy_neg.cc: New.
	* testsuite/30_threads/packaged_task/cons/move_assign.cc: New.
	* testsuite/30_threads/packaged_task/cons/move.cc: New.
	* testsuite/30_threads/packaged_task/members/boolconv.cc: New.
	* testsuite/30_threads/packaged_task/members/get_future.cc: New.
	* testsuite/30_threads/packaged_task/members/get_future2.cc: New.
	* testsuite/30_threads/packaged_task/members/invoke.cc: New.
	* testsuite/30_threads/packaged_task/members/invoke2.cc: New.
	* testsuite/30_threads/packaged_task/members/invoke3.cc: New.
	* testsuite/30_threads/packaged_task/members/invoke4.cc: New.
	* testsuite/30_threads/packaged_task/members/invoke5.cc: New.
	* testsuite/30_threads/packaged_task/members/reset.cc: New.
	* testsuite/30_threads/packaged_task/members/reset2.cc: New.
	* testsuite/30_threads/packaged_task/members/swap.cc: New.
	* testsuite/30_threads/packaged_task/requirements/
	explicit_instantiation.cc: New.
	* testsuite/30_threads/promise/cons/1.cc: New.
	* testsuite/30_threads/promise/cons/assign_neg.cc: New.
	* testsuite/30_threads/promise/cons/copy_neg.cc: New.
	* testsuite/30_threads/promise/cons/move_assign.cc: New.
	* testsuite/30_threads/promise/cons/move.cc: New.
	* testsuite/30_threads/promise/members/get_future.cc: New.
	* testsuite/30_threads/promise/members/get_future2.cc: New.
	* testsuite/30_threads/promise/members/set_exception.cc: New.
	* testsuite/30_threads/promise/members/set_exception2.cc: New.
	* testsuite/30_threads/promise/members/set_value.cc: New.
	* testsuite/30_threads/promise/members/set_value2.cc: New.
	* testsuite/30_threads/promise/members/set_value3.cc: New.
	* testsuite/30_threads/promise/members/swap.cc: New.
	* testsuite/30_threads/promise/requirements/
	explicit_instantiation.cc: New.
	* testsuite/30_threads/shared_future/cons/assign_neg.cc: New.
	* testsuite/30_threads/shared_future/cons/copy.cc: New.
	* testsuite/30_threads/shared_future/cons/default_neg.cc: New.
	* testsuite/30_threads/shared_future/cons/move.cc: New.
	* testsuite/30_threads/shared_future/members/get.cc: New.
	* testsuite/30_threads/shared_future/members/get2.cc: New.
	* testsuite/30_threads/shared_future/members/has_exception.cc: New.
	* testsuite/30_threads/shared_future/members/has_value.cc: New.
	* testsuite/30_threads/shared_future/members/is_ready.cc: New.
	* testsuite/30_threads/shared_future/members/wait.cc: New.
	* testsuite/30_threads/shared_future/members/wait_for.cc: New.
	* testsuite/30_threads/shared_future/members/wait_until.cc: New.
	* testsuite/30_threads/shared_future/requirements/
	explicit_instantiation.cc: New.
	* testsuite/30_threads/unique_future/cons/assign_neg.cc: New.
	* testsuite/30_threads/unique_future/cons/copy_neg.cc: New.
	* testsuite/30_threads/unique_future/cons/default_neg.cc: New.
	* testsuite/30_threads/unique_future/cons/move.cc: New.
	* testsuite/30_threads/unique_future/members/get.cc: New.
	* testsuite/30_threads/unique_future/members/get2.cc: New.
	* testsuite/30_threads/unique_future/members/has_exception.cc: New.
	* testsuite/30_threads/unique_future/members/has_value.cc: New.
	* testsuite/30_threads/unique_future/members/is_ready.cc: New.
	* testsuite/30_threads/unique_future/members/wait.cc: New.
	* testsuite/30_threads/unique_future/members/wait_for.cc: New.
	* testsuite/30_threads/unique_future/members/wait_until.cc: New.
	* testsuite/30_threads/unique_future/requirements/
	explicit_instantiation.cc: New.
	* testsuite/performance/30_threads/future/polling.cc: New.

From-SVN: r148765
2009-06-21 15:02:09 +01:00
Paolo Carlini
1a9e603e52 2009-06-20 Paolo Carlini <paolo.carlini@oracle.com>
* Revert last Change.

From-SVN: r148756
2009-06-21 00:57:56 +00:00
Paolo Carlini
2271f9c260 re PR libstdc++/40497 ([C++0x] troubles with std::next / std::prev declarations)
2009-06-20  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/40497
	* include/bits/stl_iterator_base_funcs.h (next, prev): Fix the
	signature per the current C++1x draft (N2857).
	* testsuite/24_iterators/operations/40497.cc: Add.

From-SVN: r148751
2009-06-20 22:27:04 +00:00
Paolo Carlini
9b88236b34 random.h (_Adaptor): Simplify for _DInputType always a floating point type.
2009-06-19  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/random.h (_Adaptor): Simplify for _DInputType always
	a floating point type.
	(uniform_int_distribution<>::uniform_int_distribution(_IntType,
	_IntType)): Fix second default argument.
	(uniform_int_distribution<>::_M_call): Remove.
	(uniform_int_distribution<>::operator()(_UniformRandomNumberGenerator&,
	const param_type&)): Only declare.
	* include/bits/random.tcc (uniform_int_distribution<>::_M_call(
	_UniformRandomNumberGenerator&, result_type, result_type, true_type):
	Remove.
	uniform_int_distribution<>::operator()(_UniformRandomNumberGenerator&,
	const param_type&): Define here.
	(geometric_distribution<>::operator()(_UniformRandomNumberGenerator&,
	const param_type&), discrete_distribution<>::operator()
	(_UniformRandomNumberGenerator&, const param_type&), 
	piecewise_constant_distribution<>::operator()
	(_UniformRandomNumberGenerator&, const param_type&),
	piecewise_linear_distribution<>::operator()
	(_UniformRandomNumberGenerator&, const param_type&)): Use double as
	the second template argument of _Adaptor.
	* testsuite/26_numerics/random/uniform_int_distribution/cons/
	default.cc: Adjust.

From-SVN: r148720
2009-06-19 17:49:31 +00:00
Paolo Carlini
f8dd9e0de0 random.tcc (discrete_distribution<>::param_type:: param_type(size_t, double, double, _Func), [...]): Tidy.
2009-06-19  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/random.tcc (discrete_distribution<>::param_type::
      	param_type(size_t, double, double, _Func),
	discrete_distribution<>::operator()(_UniformRandomNumberGenerator&,
	const param_type&)): Tidy.
	(piecewise_constant_distribution<>::param_type::_M_initialize):
	Use reserve, fix.
	(piecewise_constant_distribution<>::param_type::
	param_type(initializer_list<>, _Func),
	piecewise_constant_distribution<>::param_type::
	param_type(size_t, _RealType, _RealType, _Func),
       	piecewise_linear_distribution<>::param_type::
	param_type(initializer_list<>, _Func),
       	piecewise_linear_distribution<>::param_type::
	param_type(size_t, _RealType, _RealType, _Func)): Use reserve, tidy.
	(piecewise_constant_distribution<>::param_type::
	param_type(_InputIteratorB, _InputIteratorB, _InputIteratorW),
	piecewise_constant_distribution<>::
	operator()(_UniformRandomNumberGenerator&, const param_type&),
      	piecewise_linear_distribution<>::
	operator()(_UniformRandomNumberGenerator&, const param_type&)): Fix.
	(operator>>(std::basic_istream<>&,
	piecewise_constant_distribution<>&),
	operator>>(std::basic_istream<>&, piecewise_linear_distribution<>&)):
	Use reserve.
	* include/bits/random.h: Minor cosmetic changes.

From-SVN: r148719
2009-06-19 17:17:14 +00:00
Benjamin Kosnik
a9a51750b9 check_construct_destroy.h: New.
2009-06-17  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/23_containers/list/check_construct_destroy.h: New.
	Move test logic here.
	* testsuite/23_containers/list/moveable.h: Same.
	* testsuite/23_containers/list/modifiers/insert/25288.h: Same.
	* testsuite/23_containers/list/modifiers/1.h: Same.
	* testsuite/23_containers/list/modifiers/2.h: Same.
	* testsuite/23_containers/list/modifiers/3.h: Same.
	* testsuite/23_containers/list/modifiers/swap/1.h: Same.
	* testsuite/23_containers/list/modifiers/swap/2.h: Same.
	* testsuite/23_containers/list/modifiers/swap/3.h: Same.
	* testsuite/23_containers/list/operations/1.h: Same.
	* testsuite/23_containers/list/operations/2.h: Same.
	* testsuite/23_containers/list/operations/3.h: Same.
	* testsuite/23_containers/list/operations/4.h: Same.
	* testsuite/23_containers/list/operations/5.h: Same.
	* testsuite/23_containers/list/capacity/1.h: Same.
	* testsuite/23_containers/list/init-list.h: Same.
	* testsuite/23_containers/list/cons/1.h: Same.
	* testsuite/23_containers/list/cons/2.h: Same.
	* testsuite/23_containers/list/cons/3.h: Same.
	* testsuite/23_containers/list/cons/4.h: Same.
	* testsuite/23_containers/list/cons/5.h: Same.
	* testsuite/23_containers/list/cons/6.h: Same.
	* testsuite/23_containers/list/cons/7.h: Same.
	* testsuite/23_containers/list/cons/8.h: Same.
	* testsuite/23_containers/list/cons/9.h: Same.
	* testsuite/23_containers/list/cons/clear_allocator.h: Same.
	* testsuite/23_containers/list/modifiers/insert/25288.cc: Include test
	header.
	* testsuite/23_containers/list/modifiers/1.cc: Same.
	* testsuite/23_containers/list/modifiers/2.cc: Same.
	* testsuite/23_containers/list/modifiers/3.cc: Same.
	* testsuite/23_containers/list/modifiers/swap/1.cc: Same.
	* testsuite/23_containers/list/modifiers/swap/2.cc: Same.
	* testsuite/23_containers/list/modifiers/swap/3.cc: Same.
	* testsuite/23_containers/list/operations/1.cc: Same.
	* testsuite/23_containers/list/operations/2.cc: Same.
	* testsuite/23_containers/list/operations/3.cc: Same.
	* testsuite/23_containers/list/operations/4.cc: Same.
	* testsuite/23_containers/list/operations/5.cc: Same.
	* testsuite/23_containers/list/capacity/1.cc: Same.
	* testsuite/23_containers/list/init-list.cc: Same.
	* testsuite/23_containers/list/cons/1.cc: Same.
	* testsuite/23_containers/list/cons/2.cc: Same.
	* testsuite/23_containers/list/cons/3.cc: Same.
	* testsuite/23_containers/list/cons/4.cc: Same.
	* testsuite/23_containers/list/cons/5.cc: Same.
	* testsuite/23_containers/list/cons/6.cc: Same.
	* testsuite/23_containers/list/cons/7.cc: Same.
	* testsuite/23_containers/list/cons/8.cc: Same.
	* testsuite/23_containers/list/cons/9.cc: Same.
	* testsuite/23_containers/list/cons/clear_allocator.cc: Same.
	* testsuite/23_containers/list/check_construct_destroy.cc: Same.
	* testsuite/23_containers/list/moveable.cc: Same.

From-SVN: r148644
2009-06-18 01:40:44 +00:00
Tom Tromey
6ba49852d8 hook.in: Do not fail when there is no current objfile.
* python/hook.in: Do not fail when there is no current objfile.
	Use os.path.normpath.

From-SVN: r148626
2009-06-17 20:06:27 +00:00
Jonathan Wakely
9fdcbf4031 exception_ptr.h (exception_ptr::swap(exception_ptr&&)): Remove.
2009-06-16  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* libsupc++/exception_ptr.h (exception_ptr::swap(exception_ptr&&)):
	Remove.
	(exception_ptr::operator=(exception_ptr&&)): Cast source to
	rvalue-reference so that move constructor is called.
	* testsuite/18_support/exception_ptr/move.cc: New.

From-SVN: r148555
2009-06-16 22:24:41 +01:00
Jonathan Wakely
cd3b0fafaa thread (~thread(), [...]): Call terminate if joinable.
2009-06-16  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* include/std/thread (~thread(), operator=(thread&&)): Call terminate
	if joinable.

From-SVN: r148552
2009-06-16 21:34:43 +01:00
Tom Tromey
ee47095bb4 printers.py (StdMapPrinter.__init__): Don't set self.iter.
* python/libstdcxx/v6/printers.py (StdMapPrinter.__init__): Don't
	set self.iter.
	(StdMapPrinter.to_string): Make a new iterator.
	(StdMapPrinter.children): Likewise.
	(StdSetPrinter.__init__): Don't set self.iter.
	(StdSetPrinter.to_string): Make a new iterator.
	(StdSetPrinter.children): Likewise.

From-SVN: r148506
2009-06-15 20:54:22 +00:00
Paolo Carlini
f9b09dec19 random.tcc (negative_binomial_distribution<>::operator() (_UniformRandomNumberGenerator&, const param_type&): Tweak to use a class member gamma_distribution.
2009-06-11  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/random.tcc
	(negative_binomial_distribution<>::operator()
	(_UniformRandomNumberGenerator&, const param_type&): Tweak to use a
	class member gamma_distribution.
	(negative_binomial_distribution<>::operator()
	(_UniformRandomNumberGenerator&)): Implement out of line here.
	(operator<<(basic_ostream<>&, negative_binomial_distribution<>),
	operator>>(basic_ostream<>&, negative_binomial_distribution<>): Adjust.
	(student_t_distribution<>::operator()
	(_UniformRandomNumberGenerator&, const param_type&): Move inline,
	simplify.
	(operator<<(basic_ostream<>&, student_t_distribution<>),
	operator>>(basic_ostream<>&, student_t_distribution<>): Adjust.
	(chi_squared_distribution<>::operator()
	(_UniformRandomNumberGenerator&, const param_type&): Move inline,
	tweak to use a class member gamma_distribution.
	(operator<<(basic_ostream<>&, chi_squared_distribution<>),
	operator>>(basic_ostream<>&, chi_squared_distribution<>): Adjust.
	(fisher_f_distribution<>::operator() (_UniformRandomNumberGenerator&,
	const param_type&): Move inline, tweak to use class member
	gamma_distributions.
	(operator<<(basic_ostream<>&, fisher_f_distribution<>),
	operator>>(basic_ostream<>&, fisher_f_distribution<>): Adjust.
	* include/bits/random.h: Adjust, minor tweaks.

From-SVN: r148393
2009-06-11 18:32:30 +00:00
Tom Tromey
3af622115b printers.py (lookup_function): Remove extra ';'.
* python/libstdcxx/v6/printers.py (lookup_function): Remove extra
	';'.
	(build_libstdcxx_dictionary): Accept shortened form of
	basic_string names.
	(StdStringPrinter.to_string): Remove reference to WideEncoding.

From-SVN: r148358
2009-06-10 22:59:01 +00:00
Tom Tromey
35204bbe76 re PR libstdc++/40289 (share/libstdc++/python/ pollutes common namespace)
PR libstdc++/40289:
	* python/Makefile.in: Rebuild.
	* python/hook.in: Compute module path relative to objfile.
	* python/Makefile.am (pythondir): Redefine.
	(gdb.py): Subst toolexeclibdir.
	(install-data-local): Rewrite.

From-SVN: r148357
2009-06-10 22:58:22 +00:00
Benjamin Kosnik
fd9380a6cd move.h: Doxygen group fixes.
2009-06-09  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/move.h: Doxygen group fixes.

From-SVN: r148337
2009-06-10 02:14:32 +00:00
Paolo Carlini
b01630bb3d random.tcc (gamma_distribution<>::operator() (_UniformRandomNumberGenerator&, const param_type&): Redo, using the Marsaglia/Tsang algorithm.
2009-06-08  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/random.tcc (gamma_distribution<>::operator()
	(_UniformRandomNumberGenerator&, const param_type&): Redo, using
	the Marsaglia/Tsang algorithm.
	(gamma_distribution<>::param_type::_M_initialize): Adjust.
	(operator<<(basic_ostream<>&, gamma_distribution<>),
	operator>>(basic_ostream<>&, gamma_distribution<>): Likewise.

	* include/bits/random.tcc(student_t_distribution<>::_M_gaussian):
	Remove, just use normal_distribution.
	(operator<<(basic_ostream<>&, student_t_distribution<>),
	operator>>(basic_ostream<>&, student_t_distribution<>): Adjust.
	(linear_congruential_engine<>::operator()()): Move inline.
	(lognormal_distribution<>::operator()(_UniformRandomNumberGenerator&,
	const param_type&)): Move inline, just use normal_distribution.
	(operator<<(basic_ostream<>&, lognormal_distribution<>),
	operator>>(basic_ostream<>&, lognormal_distribution<>): Adjust.
	(weibull_distribution<>::operator()(_UniformRandomNumberGenerator&,
	const param_type&)): Move here, out of line.
	(piecewise_constant_distribution<>::param_type::param_type()): Move
	inline.
	* include/bits/random.h: Adjust, minor tweaks.

From-SVN: r148276
2009-06-08 14:38:48 +00:00
Benjamin Kosnik
ca462c38d1 aggregate.cc: Remove xfail.
2009-06-05  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/29_atomics/atomic_address/cons/aggregate.cc: Remove xfail.

From-SVN: r148222
2009-06-05 18:37:00 +00:00
Benjamin Kosnik
5580c6e729 throw_allocator.h: Rework.
2009-06-04  Benjamin Kosnik  <bkoz@redhat.com>

	* include/ext/throw_allocator.h: Rework.
	* include/ext/pb_ds/detail/debug_map_base.hpp: Adjust usage.
	* include/ext/pb_ds/detail/gp_hash_table_map_/resize_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/ov_tree_map_/erase_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp: Same.
	* testsuite/23_containers/list/modifiers/insert/25288.cc: Same.
	* testsuite/util/regression/rand/priority_queue/
	container_rand_regression_test.tcc: Inline functions.
	* testsuite/util/regression/rand/assoc/
	container_rand_regression_test.tcc: Same.

From-SVN: r148204
2009-06-05 08:45:26 +00:00
Benjamin Kosnik
b49e9f7a3d 6.cc: Adjust test name.
2009-06-03  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/23_containers/list/cons/6.cc: Adjust test name.

From-SVN: r148140
2009-06-03 17:44:43 +00:00
Paolo Carlini
110a123aae re PR libstdc++/40296 ([C++0x] std::exception_ptr comparisons)
2009-06-03  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/40296
	* libsupc++/exception_ptr.h (exception_ptr::operator!,
	exception_ptr::operator __safe_bool): Only declare when
	_GLIBCXX_EH_PTR_COMPAT is undefined.
	* libsupc++/eh_ptr.cc: Define _GLIBCXX_EH_PTR_COMPAT before including
	exception_ptr.
	* testsuite/18_support/exception_ptr/40296.cc: New.
	* testsuite/18_support/nested_exception/throw_with_nested.cc: Adjust.
	* testsuite/18_support/nested_exception/cons.cc: Likewise.
	* testsuite/18_support/nested_exception/nested_ptr.cc: Likewise.
	* testsuite/18_support/exception_ptr/current_exception.cc: Likewise.

From-SVN: r148122
2009-06-03 10:37:20 +00:00
Richard Sandiford
70ed7339f7 crossconfig.m4 (GLIBCXX_CROSSCONFIG): Handle AIX targets.
libstdc++-v3/
	* crossconfig.m4 (GLIBCXX_CROSSCONFIG): Handle AIX targets.
	* configure: Regenerate.

From-SVN: r148098
2009-06-02 19:15:03 +00:00
Paolo Carlini
a67b92c3d7 re PR libstdc++/40299 (Rope + C++0x mode = build error)
2009-06-03  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/40299
	* include/ext/memory: Fully qualify calls with __gnu_cxx.
	* testsuite/ext/rope/40299.cc: New.

From-SVN: r148081
2009-06-02 09:06:31 +00:00
Tom Tromey
4185041973 Makefile.in, [...]: New files.
2009-05-28  Tom Tromey  <tromey@redhat.com>
	    Phil Muldoon  <pmuldoon@redhat.com>
	    Jonathan Wakely  <jwakely.gcc@gmail.com>

	* python/Makefile.in, , python/libstdcxx/__init__.py,
	python/libstdcxx/v6/__init__.py, python/libstdcxx/v6/printers.py,
	python/hook.in, python/Makefile.am: New files.
	* configure, Makefile.in: Rebuild.
	* acinclude.m4 (glibcxx_SUBDIRS): Add python.
	* Makefile.am (SUBDIRS): Add python.

Co-Authored-By: Jonathan Wakely <jwakely.gcc@gmail.com>
Co-Authored-By: Phil Muldoon <pmuldoon@redhat.com>

From-SVN: r147958
2009-05-28 17:14:18 +00:00
Benjamin Kosnik
daa159291b testsuite_allocator.h (check_new, [...]): Move to ...
2009-05-28  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/util/testsuite_allocator.h (check_new, check_delete): Move
	to ...
	* testsuite/util/replacement_memory_operators.h: ...here. New.
	* testsuite/util/testsuite_hooks.h (counter): To object_counter.
	* testsuite/util/testsuite_hooks.cc: Same.

	* testsuite/ext/mt_allocator/deallocate_local_thread-1.cc: Use
	replacement_memory_operators.h.
	* testsuite/ext/mt_allocator/deallocate_local_thread-3.cc: Same.
	* testsuite/ext/mt_allocator/check_delete.cc: Same.
	* testsuite/ext/mt_allocator/deallocate_local_thread-5.cc: Same.
	* testsuite/ext/mt_allocator/deallocate_local_thread-7.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-6.cc: Same.
	* testsuite/ext/mt_allocator/deallocate_local-8.cc: Same.
	* testsuite/ext/mt_allocator/deallocate_global-2.cc: Same.
	* testsuite/ext/mt_allocator/deallocate_global-4.cc: Same.
	* testsuite/ext/mt_allocator/check_new.cc: Same.
	* testsuite/ext/debug_allocator/check_delete.cc: Same.
	* testsuite/ext/debug_allocator/check_new.cc: Same.
	* testsuite/ext/new_allocator/deallocate_global.cc: Same.
	* testsuite/ext/new_allocator/check_delete.cc: Same.
	* testsuite/ext/new_allocator/check_new.cc: Same.
	* testsuite/ext/new_allocator/deallocate_local.cc: Same.
	* testsuite/ext/throw_allocator/deallocate_global.cc: Same.
	* testsuite/ext/throw_allocator/check_delete.cc: Same.
	* testsuite/ext/throw_allocator/check_new.cc: Same.
	* testsuite/ext/throw_allocator/deallocate_local.cc: Same.
	* testsuite/ext/malloc_allocator/deallocate_global.cc: Same.
	* testsuite/ext/malloc_allocator/check_delete.cc: Same.
	* testsuite/ext/malloc_allocator/check_new.cc: Same.
	* testsuite/ext/malloc_allocator/deallocate_local.cc: Same.
	* testsuite/ext/pool_allocator/check_delete.cc: Same.
	* testsuite/ext/pool_allocator/check_new.cc: Same.
	* testsuite/ext/bitmap_allocator/check_delete.cc: Same.
	* testsuite/ext/bitmap_allocator/check_new.cc: Same.
	* testsuite/ext/array_allocator/check_delete.cc: Same.
	* testsuite/ext/array_allocator/check_new.cc: Same.
	* testsuite/23_containers/deque/cons/1.cc: Same.
	* testsuite/23_containers/deque/cons/2.cc: Same.

From-SVN: r147937
2009-05-28 00:17:00 +00:00
Jason Merrill
c5adc4275c call.c (implicit_conversion): Handle conversion from initializer-list to scalar.
* call.c (implicit_conversion): Handle conversion from
	initializer-list to scalar.
	(convert_like_real): Likewise.  Avoid crashing on list
	initialization with bad conversions.
	(can_convert): Use LOOKUP_EXPLICIT.
	(can_convert_arg_bad): Add flags parm.
	* cp-tree.h: Adjust.
	* typeck.c (convert_for_assignment): Pass flags.

From-SVN: r147933
2009-05-27 18:23:41 -04:00
Benjamin Kosnik
eaf4cf4fdc initializer_list: Format.
2009-05-27  Benjamin Kosnik  <bkoz@redhat.com>

	* libsupc++/initializer_list: Format.
	* testsuite/18_support/initializer_list/requirements/typedefs.cc: New.
	* testsuite/18_support/initializer_list/requirements/
	explicit_instantiation.cc: New.

From-SVN: r147931
2009-05-27 21:17:49 +00:00
Benjamin Kosnik
626e0599af re PR libstdc++/40273 ([C++0x] Invalid conversion to bool is reported)
2009-05-27  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/40273
	* include/tr1_impl/functional: Add explicit cast.
	* testsuite/20_util/function/requirements/
	explicit_instantiation.cc: New.
	* testsuite/20_util/function/null_pointer_comparisons.cc: New.

From-SVN: r147930
2009-05-27 20:32:30 +00:00
Eelis van der Weegen
ffa52e113d initializer_list (initializer_list): Add missing typedefs.
2009-05-24  Eelis van der Weegen  <eelis@eelis.net>
	
	* libsupc++/initializer_list (initializer_list): Add missing typedefs.

From-SVN: r147828
2009-05-24 04:44:50 +00:00
Benjamin Kosnik
e4c29fbc9e re PR bootstrap/40221 (Powerpc bootstrap is broken in building libstdc++)
2009-05-21  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/40221
	* include/tr1_impl/functional: Add explicit cast.

From-SVN: r147794
2009-05-22 07:19:37 +00:00