Commit Graph

6776 Commits

Author SHA1 Message Date
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
7d9d5bb6c9 hashtable.h (_Hashtable<>:_M_get_Value_allocator): Remove, unused.
2010-10-25  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/hashtable.h (_Hashtable<>:_M_get_Value_allocator):
	Remove, unused.

From-SVN: r165912
2010-10-25 09:42:08 +00:00
François Dumont
68478bb473 debug.cc: Fix parameter indexes in __msg_valid_range2 message.
2010-10-24  François Dumont  <francois.cppdevs@free.fr>

	* src/debug.cc: Fix parameter indexes in __msg_valid_range2 message.
	Replace 'before begin' decription in 'before-begin' for consistency
	with 'paste-the-end'.

From-SVN: r165899
2010-10-24 10:39:11 +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
Jonathan Wakely
405de314b8 re PR libstdc++/45990 (28_regex/07_traits/char/isctype.cc XPASSes on Solaris 2/IRIX 6)
PR libstdc++/45990
	* include/bits/regex.h (regex_traits::isctype): DR 1337.

From-SVN: r165438
2010-10-13 23:52:25 +01: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
ce9555cb82 random.h (discrete_distribution<>::param_type): Disable move operations.
2010-10-12  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/random.h (discrete_distribution<>::param_type):
	Disable move operations.
	(piecewise_constant_distribution<>::param_type): Likewise.
	(piecewise_linear_distribution<>::param_type): Likewise.

	* include/bits/random.h (discrete_distribution<>::param_type::
	param_type()): Simplify, don't use _M_initialize.
	(piecewise_constant_distribution<>::param_type::param_type()):
	Likewise.
	(piecewise_linear_distribution<>::param_type::param_type()):
	Likewise.

From-SVN: r165391
2010-10-12 18:38:42 +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
Benjamin Kosnik
63835102f4 api.xml: Add link to 4.5 generated docs.
2010-10-11  Benjamin Kosnik  <bkoz@redhat.com>

	* doc/xml/api.xml: Add link to 4.5 generated docs.

From-SVN: r165332
2010-10-11 21:28:17 +00:00
Paolo Carlini
0fd76d8e4c future (_Result_alloc): Derive from _Alloc, exploit the Empty Base Optimization.
2010-10-08  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/future (_Result_alloc): Derive from _Alloc,
	exploit the Empty Base Optimization.

From-SVN: r165194
2010-10-08 20:30:44 +00:00
Jonathan Wakely
708f539dd1 re PR libstdc++/45403 (python pretty printer for std::string requires GDB 7.1)
PR libstdc++/45403
	* python/libstdcxx/v6/printers.py: Check for lazy_string support.

From-SVN: r165163
2010-10-08 12:31:56 +01:00
Paolo Carlini
135a0d0ac5 future (uses_allocator<packaged_task<>,>): Add; minor formatting tweaks.
2010-10-08  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/future (uses_allocator<packaged_task<>,>): Add;
	minor formatting tweaks.

From-SVN: r165151
2010-10-08 09:22:16 +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
b607a144ea re PR libstdc++/45924 ([C++0x] bind<R>(x)(y, z) fails)
2010-10-07  Jonathan Wakely  <jwakely.gcc@gmail.com>

	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: r165075
2010-10-07 01:19:18 +01: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
Rainer Orth
db0d4b71b5 re PR libstdc++/45863 (FAIL: libstdc++-abi/abi_check)
PR libstdc++/45863
	* scripts/extract_symvers: Restore revision 164879.
	Only use pvs on SunOS.

From-SVN: r165055
2010-10-06 17:01:11 +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
Jonathan Wakely
94a9600ce3 locale_facets_nonio.h (time_get::get_time): Doc typo.
2010-10-05  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* include/bits/locale_facets_nonio.h (time_get::get_time): Doc typo.
	(time_get::get_date): Likewise.

From-SVN: r165002
2010-10-05 21:58:59 +01:00
Jonathan Wakely
c6f3b5880e 2010-10-05 Jonathan Wakely <jwakely.gcc@gmail.com>
* Remove svn conflict marker in ChangeLog.

From-SVN: r165001
2010-10-05 21:43:04 +01:00
Paolo Carlini
033b71cea1 type_traits (_GLIBCXX_HAS_NESTED_TYPE): Add.
2010-10-05  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/type_traits (_GLIBCXX_HAS_NESTED_TYPE): Add.
	* include/std/functional (_Has_result_type_helper,
	_Has_result_type): Remove; use the above to define __has_result_type.
	* include/bits/stl_iterator_base_types.h: Use the above to define
	__has_iterator_category.
	* include/bits/allocator.h (__has_allocator_type): Use the above.
	* include/bits/cpp_type_traits.h (__has_iterator_category,
	__is_iterator): Remove.

From-SVN: r164993
2010-10-05 15:53:35 +00:00
Sebastian Huber
79d34420f6 re PR libstdc++/44647 (std::nothrow and std::bad_alloc are coupled)
2010-10-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
	    Jonathan Wakely  <jwakely.gcc@gmail.com>

	PR libstdc++/44647
	* libsupc++/Makefile.am (sources): Add bad_alloc.cc.
	* libsupc++/new_handler.cc (bad_alloc): Move to ...
	* libsupc++/bad_alloc.cc (bad_alloc): ... here, new file.
	* libsupc++/Makefile.in: Regenerate.

Co-Authored-By: Jonathan Wakely <jwakely.gcc@gmail.com>

From-SVN: r164973
2010-10-05 09:41:57 +00:00
Paolo Carlini
6703f185d4 functional (function<>::swap): Use std::swap.
2010-10-04  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/functional (function<>::swap): Use std::swap.
	* include/tr1/functional (function<>::swap): Likewise.

From-SVN: r164952
2010-10-04 17:28:24 +00:00
Andreas Schwab
b453ace381 acinclude.m4 (GLIBCXX_ENABLE): Properly quote argument to AC_HELP_STRING.
* acinclude.m4 (GLIBCXX_ENABLE): Properly quote argument to
AC_HELP_STRING.  Double quote expansion of _g_help.
(GLIBCXX_ENABLE_LIBSTDCXX_TIME): Double quote third argument of
GLIBCXX_ENABLE.
(GLIBCXX_ENABLE_CHEADERS): Likewise.
(GLIBCXX_ENABLE_CLOCALE): Likewise.
(GLIBCXX_ENABLE_ALLOCATOR): Likewise.
(GLIBCXX_ENABLE_CSTDIO): Likewise.
(GLIBCXX_ENABLE_SYMVERS): Likewise.
* configure: Regenerate.

From-SVN: r164927
2010-10-04 08:49:59 +00:00
H.J. Lu
128dbdd219 Revert the pvs change.
2010-10-02  H.J. Lu  <hongjiu.lu@intel.com>

	PR libstdc++/45863
	* scripts/extract_symvers: Revert the pvs change.

From-SVN: r164913
2010-10-02 17:31:06 -07: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
Michael Eager
809201325a Check in support for Xilinx MicroBlaze processor.
From-SVN: r164756
2010-09-30 18:21:57 +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
DJ Delorie
3f984eefb1 hash_bytes.cc (_Hash_bytes): Replace "clength" with "len" for "unusual sizeof(size_t)" case.
* libsupc++/hash_bytes.cc (_Hash_bytes): Replace "clength" with
"len" for "unusual sizeof(size_t)" case.

From-SVN: r164714
2010-09-28 22:00:09 -04: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
Paolo Carlini
f3961bdf99 cmath (__pow_helper): Remove.
2010-09-27  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/c_std/cmath (__pow_helper): Remove.
	(__cmath_power): Remove declaration.
	* include/c_global/cmath: Likewise.
	* include/std/complex (__complex_pow_unsigned): Add.
	(pow(const complex<_Tp>&, int)): Use the latter.
	* include/c_std/cmath.tcc: Remove file.
	* include/c_global/cmath.tcc: Likewise.
	* acinclude.m4: Adjust.
	* include/Makefile.am: Likewise.
	* configure: Regenerate.
	* include/Makefile.in: Likewise.

From-SVN: r164645
2010-09-27 09:27:05 +00:00
Paolo Carlini
c98ca4c79c 2010-09-22 Paolo Carlini <paolo.carlini@oracle.com>
* Fix typo in last ChangeLog entry.

From-SVN: r164530
2010-09-22 19:46:06 +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
5d64ee190c functional_hash.h (__hash_base): Add.
2010-09-22  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/functional_hash.h (__hash_base): Add.
	(hash): Derive from __hash_base instead.
	* include/debug/bitset (hash): Likewise.
	* include/debug/vector (hash): Likewise.
	* include/std/system_error (hash): Likewise.
	* include/std/thread (hash): Likewise.
	* include/std/bitset (hash): Likewise.
	* include/profile/bitset (hash): Likewise.
	* include/profile/vector (hash): Likewise.
	* include/bits/basic_string.h (hash): Likewise.
	* include/bits/stl_bvector.h (hash): Likewise.
	* include/std/typeindex (hash): Do not derive from unary_function,
	add result_type and argument_type typedefs; trim includes.

From-SVN: r164528
2010-09-22 17:50:36 +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
Ralf Wildenhues
8d03ad011a re PR libstdc++/45711 (Building with "--enable-libstdcxx-debug" fails during install)
Fix PR libstdc++/45711.

libstdc++-v3/:
	PR libstdc++/45711
	* src/Makefile.am (stamp-debug): Also adjust possibly-relative
	file names in MKDIR_P, and, for consistency, also top_build_prefix.
	* src/Makefile.in: Regenerate.

From-SVN: r164451
2010-09-20 19:33:12 +00:00