Commit Graph

7246 Commits

Author SHA1 Message Date
Paolo Carlini
e8a25ac83c 50862.cc: Trivial formatting fixes.
2011-10-28  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/30_threads/condition_variable_any/50862.cc: Trivial
	formatting fixes.

From-SVN: r180617
2011-10-28 14:33:21 +00:00
Paolo Carlini
4a6b297c98 count.cc: New.
2011-10-28  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/23_containers/unordered_map/operations/count.cc: New.
	* testsuite/23_containers/multimap/operations/count.cc: Likewise.
	* testsuite/23_containers/set/operations/count.cc: Likewise.
	* testsuite/23_containers/unordered_multimap/operations/count.cc:
	Likewise.
	* testsuite/23_containers/unordered_set/operations/count.cc: Likewise.
	* testsuite/23_containers/multiset/operations/count.cc: Likewise.
	* testsuite/23_containers/unordered_multiset/operations/count.cc:
	Likewise.
	* testsuite/23_containers/map/operations/count.cc: Likewise.

From-SVN: r180612
2011-10-28 11:54:04 +00:00
Richard B. Kreckel
4c16fa7714 complex (__complex_acosh): Just use '< _Tp()'.
2011-10-28  Richard B. Kreckel  <kreckel@ginac.de>

	* include/std/complex (__complex_acosh): Just use '< _Tp()'.
	* include/tr1/complex (__complex_acosh): Likewise.

From-SVN: r180607
2011-10-28 09:34:52 +00:00
Richard B. Kreckel
259f206328 re PR libstdc++/50880 (__complex_acosh() picks wrong complex branch)
2011-10-27  Richard B. Kreckel  <kreckel@ginac.de>
	    Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/50880
	* include/std/complex (__complex_acosh): Fix for __z.real() < 0.
	* include/tr1/complex (__complex_acosh): Likewise.
	* testsuite/26_numerics/complex/50880.cc: New.
	* testsuite/tr1/8_c_compatibility/complex/50880.cc: Likewise.

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

From-SVN: r180563
2011-10-27 11:00:25 +00:00
Jonathan Wakely
28c2f60e96 re PR libstdc++/50862 (deadlock in std::condition_variable_any)
PR libstdc++/50862
	* include/std/condition_variable (condition_variable_any::wait): Avoid
	terminating if relocking user mutex throws during stack-unwinding.
	* testsuite/30_threads/condition_variable_any/50862.cc: Add dg-require.

From-SVN: r180549
2011-10-27 00:35:26 +01:00
Paolo Carlini
7f808cadda 2011-10-26 Paolo Carlini <paolo.carlini@oracle.com>
* Tweak last ChangeLog entry.

From-SVN: r180532
2011-10-26 18:04:57 +00:00
Jonathan Wakely
0fd72195bc condition_variable (condition_variable_any): Remove unused native_handle_type typedef.
* include/std/condition_variable (condition_variable_any): Remove
	unused native_handle_type typedef.
	* src/condition_variable.cc (condition_variable): Add missing noexcept
	specifications.
	* 30_threads/condition_variable_any/requirements/typedefs.cc: Remove.

From-SVN: r180454
2011-10-25 22:44:12 +01:00
Jonathan Wakely
5d020aa222 re PR libstdc++/50862 (deadlock in std::condition_variable_any)
PR libstdc++/50862
	* include/std/condition_variable (condition_variable_any::wait): Fix
	deadlock and ensure _Lock::lock() is called on exit.
	(condition_variable_any::native_handle): Remove, as per LWG 1500.
	* testsuite/30_threads/condition_variable_any/50862.cc: New.

From-SVN: r180446
2011-10-25 21:56:43 +01:00
Jonathan Wakely
b81e920eac re PR libstdc++/49894 ([C++0x] Uniform initialization in constructor)
PR libstdc++/49894
	* include/std/mutex (__mutex_base,__recursive_mutex_base): Define new
	base classes to manage construction/destruction of native mutexes,
	using NSDMI when INIT macros are defined.
	(mutex,recursive_mutex,timed_mutex,recursive_timed_mutex): Derive from
	new base classes.
	* include/std/condition_variable (condition_variable): Use NSDMI when
	INIT macro is defined. Use noexcept.
	* src/condition_variable.cc (condition_variable): Explicitly-default
	constructor/destructor when using NSDMI. Use noexcept.
	(condition_variable_any): Likewise.

From-SVN: r180411
2011-10-25 00:26:25 +01:00
Jonathan Wakely
d41c3b8947 49668.cc: Add missing dg-require.
* testsuite/30_threads/async/49668.cc: Add missing dg-require.
	* testsuite/30_threads/packaged_task/49668.cc: Likewise.

From-SVN: r180400
2011-10-24 20:11:31 +01:00
Jonathan Wakely
ec8ab7c4e4 re PR libstdc++/50834 (Documentation about STL thread safety is ambiguous)
PR libstdc++/50834
	* doc/xml/manual/using.xml: Update thread safety docs w.r.t. C++11.

From-SVN: r180359
2011-10-24 01:19:56 +01:00
Jonathan Wakely
3b2eeb43cf re PR libstdc++/50196 ([C++0x] std::thread not available under macos)
PR libstdc++/50196
	* acinclude.m4 (GLIBCXX_HAS_GTHREADS): Don't depend on _POSIX_TIMEOUTS.
	* configure: Regenerate.
	* include/std/mutex (timed_mutex, recursive_timed_mutex): Define
	conditionally on GTHREADS_HAS_MUTEX_TIMEDLOCK.
	* testsuite/lib/libstdc++.exp (check_v3_target_gthreads_timed): Define.
	* testsuite/lib/dg-options.exp (dg-require-gthreads-timed): Define.
	* testsuite/30_threads/recursive_timed_mutex/dest/destructor_locked.cc:
	Use dg-require-gthreads-timed instead of dg-require-gthreads.
	* testsuite/30_threads/recursive_timed_mutex/native_handle/
	typesizes.cc: Likewise.
	* testsuite/30_threads/recursive_timed_mutex/native_handle/1.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/cons/assign_neg.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/cons/1.cc: Likewise.
	* testsuite/30_threads/recursive_timed_mutex/cons/copy_neg.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/requirements/typedefs.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc: Likewise.
	* testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc: Likewise.
	* testsuite/30_threads/recursive_timed_mutex/lock/1.cc: Likewise.
	* testsuite/30_threads/recursive_timed_mutex/lock/2.cc: Likewise.
	* testsuite/30_threads/recursive_timed_mutex/unlock/1.cc: Likewise.
	* testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc:
	Likewise.
	* testsuite/30_threads/timed_mutex/dest/destructor_locked.cc: Likewise.
	* testsuite/30_threads/timed_mutex/native_handle/typesizes.cc:
	Likewise.
	* testsuite/30_threads/timed_mutex/native_handle/1.cc: Likewise.
	* testsuite/30_threads/timed_mutex/try_lock_until/1.cc: Likewise.
	* testsuite/30_threads/timed_mutex/try_lock_until/2.cc: Likewise.
	* testsuite/30_threads/timed_mutex/cons/assign_neg.cc: Likewise.
	* testsuite/30_threads/timed_mutex/cons/1.cc: Likewise.
	* testsuite/30_threads/timed_mutex/cons/copy_neg.cc: Likewise.
	* testsuite/30_threads/timed_mutex/requirements/standard_layout.cc:
	Likewise.
	* testsuite/30_threads/timed_mutex/requirements/typedefs.cc: Likewise.
	* testsuite/30_threads/timed_mutex/try_lock/1.cc: Likewise.
	* testsuite/30_threads/timed_mutex/try_lock/2.cc: Likewise.
	* testsuite/30_threads/timed_mutex/lock/1.cc: Likewise.
	* testsuite/30_threads/timed_mutex/unlock/1.cc: Likewise.
	* testsuite/30_threads/timed_mutex/try_lock_for/1.cc: Likewise.
	* testsuite/30_threads/timed_mutex/try_lock_for/2.cc: Likewise.
	* testsuite/30_threads/timed_mutex/try_lock_for/3.cc: Likewise.
	* testsuite/30_threads/unique_lock/cons/5.cc: Likewise.
	* testsuite/30_threads/unique_lock/cons/6.cc: Likewise.
	* testsuite/30_threads/unique_lock/locking/3.cc: Likewise.
	* testsuite/30_threads/unique_lock/locking/4.cc: Likewise.

From-SVN: r180329
2011-10-22 22:31:24 +01:00
Benjamin Kosnik
24ef84f6c3 [multiple changes]
2011-10-19  Ed Smith-Rowland  <3dw4rd@verizon.net>

	* include/tr2/bool_set (bool_set): New.
	* include/tr2/bool_set.tcc: New.
	* include/tr2/dynamic_bitset (dynamic_bitset): New.
	* include/tr2/ratio (kibi, mebi, gibi, tebi, pebi, exbi): New.
	* include/Makefile.am: Add files.
	* include/Makefile.in: Regenerate.

2011-10-19  Benjamin Kosnik  <bkoz@redhat.com>

	* doc/doxygen/user.cfg.in: Add tr2 files.
	* testsuite/tr2/headers/all.cc: New.
	* testsuite/tr2/headers/using_namespace_std_tr2.cc: New.

	* include/tr2/type_traits: Tweak.

From-SVN: r180211
2011-10-19 22:05:26 +00:00
Jason Merrill
a2e70335e2 re PR c++/50500 ([C++0x] [DR 1082] move constructor should cause copy constructor to be deleted, but still declared)
PR c++/50500
	DR 1082
	* class.c (type_has_user_declared_move_constructor): New.
	(type_has_user_declared_move_assign): New.
	(add_implicitly_declared_members): Add lazy copy ops
	even if there's a move.
	* method.c (lazily_declare_fn): Delete implicit copies
	if there's a move.
	(maybe_explain_implicit_delete): Explain this.  Use inform rather
	than error.
	* cp-tree.h: Declare new fns.

From-SVN: r180159
2011-10-18 13:39:15 -04:00
Benjamin Kosnik
4daba88481 [multiple changes]
2011-10-17  Michael Spertus  <mike_spertus@symantec.com>

	* gcc/c-family/c-common.c (c_common_reswords): Add __bases,
	__direct_bases.
	* gcc/c-family/c-common.h: Add RID_BASES and RID_DIRECT_BASES.

2011-10-17  Michael Spertus  <mike_spertus@symantec.com>

	* cp-tree.def: Add BASES as a new tree code.
	* cp-tree.h (enum cp_trait_kind): Add CPTK_BASES, CPTK_DIRECT_BASES.
	(BASES_TYPE, BASES_DIRECT): Define.
	(calculate_bases, finish_bases, calculate_direct_bases): Declare.
	* parser.c (cp_parser_trait_expr, cp_parser_template_argument_list,
	(cp_parser_simple_type_specifier, cp_parser_save_nsdmi): Use them.
	* pt.c (find_parameter_packs_r, tsubst_pack_expansion): Likewise.
	* semantics.c (calculate_bases, finish_bases, calculate_direct_bases,
	dfs_calculate_bases_pre, dfs_calculate_bases_post,
	calculate_bases_helper): Define.

2011-10-17  Michael Spertus  <mike_spertus@symantec.com>

	* g++.dg/ext/bases.C: New test.

2011-10-17  Michael Spertus  <mike_spertus@symantec.com>

	* include/tr2/type_traits (bases, direct_bases, typelist): New.

2011-10-17  Benjamin Kosnik  <bkoz@redhat.com>

	* libstdc++-v3/include/Makefile.am: Add tr2 directory and includes.
	* libstdc++-v3/include/Makefile.in: Regenerate.

	* scripts/create_testsuite_files: Search tr2 directory.
	* testsuite/libstdc++-dg/conformance.exp: Same.

	* testsuite/tr2/bases/requirements/explicit_instantiation.cc: New.
	* testsuite/tr2/bases/requirements/typedefs.cc: New.
	* testsuite/tr2/bases/value.cc: New.
	* testsuite/tr2/direct_bases/requirements/
	explicit_instantiation.cc: New.
	* testsuite/tr2/direct_bases/requirements/typedefs.cc: New.
	* testsuite/tr2/direct_bases/value.cc: New.

From-SVN: r180121
2011-10-18 02:58:06 +00:00
Rainer Orth
47fc10353d Remove duplicate symbol in gnu.ver (PR bootstrap/50715)
PR bootstrap/50715
	* config/abi/pre/gnu.ver (CXXABI_1.3.6): Remove duplicate
	__cxa_get_exception_ptr.

From-SVN: r180097
2011-10-17 15:14:54 +00:00
François Dumont
9918dc0f99 41975.cc: New.
2011-10-14  François Dumont  <francois.cppdevs@free.fr>

	* testsuite/performance/23_containers/insert_erase/41975.cc: New.

From-SVN: r179968
2011-10-14 11:25:27 +00:00
Jonathan Wakely
5fabae4e53 50714.cc: Fix mychar.
2011-10-14  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* testsuite/22_locale/codecvt_byname/50714.cc: Fix mychar.

From-SVN: r179966
2011-10-14 10:38:23 +00:00
Jonathan Yong
d7a3ef9794 configure.host: Use config/os/mingw32-w64 instead of config/os/mingw32 if vendor key is "w64".
2011-10-14  Jonathan Yong  <jon_y@users.sourceforge.net>

	* configure.host: Use config/os/mingw32-w64 instead of
	config/os/mingw32 if vendor key is "w64".
	* config/os/mingw32-w64: Duplicate from config/os/mingw32.
	* config/os/mingw32-w64/os_defines.h: Enable
	_GLIBCXX_FULLY_DYNAMIC_STRING if undefined.
	* acinclude.m4: Set fully-dynamic-string to 1 when enabled,
	0 when disabled or undefined if unset by user.
	* include/bits/basic_string.h: Check if
	_GLIBCXX_FULLY_DYNAMIC_STRING is set to 0 instead of undefined.
	include/bits/basic_string.tcc: Likewise.
	* configure: Regenerated.
	* config.h.in: Likewise.

From-SVN: r179961
2011-10-14 08:57:55 +02:00
Paolo Carlini
b78eebe4f5 re PR libstdc++/50714 (codecvt_byname::codecvt::_M_c_locale_codecvt not initialized by destroyed)
2011-10-13  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/50714
	* include/bits/codecvt.h (codecvt<>::codecvt(size_t)): Initialize
	_M_c_locale_codecvt member.
	* testsuite/22_locale/codecvt_byname/50714.cc: New.

From-SVN: r179948
2011-10-14 00:12:40 +00:00
Paolo Carlini
578f023490 re PR c++/50594 (Option -fwhole-program discards replaced new operator for std::string)
2011-10-12  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/50594
	* decl.c (cxx_init_decl_processing): Add
	__attribute__((externally_visible)) to operator new and
	operator delete library fn.

2011-10-12  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/50594
	* libsupc++/new (operator new, operator delete): Decorate with
	__attribute__((__externally_visible__)).
	* include/bits/c++config: Add _GLIBCXX_THROW.
	* libsupc++/del_op.cc: Adjust.
	* libsupc++/del_opv.cc: Likewise.
	* libsupc++/del_opnt.cc: Likewise.
	* libsupc++/del_opvnt.cc: Likewise.
	* libsupc++/new_op.cc: Likewise.
	* libsupc++/new_opv.cc: Likewise.
	* libsupc++/new_opnt.cc: Likewise.
	* libsupc++/new_opvnt.cc: Likewise.
	* testsuite/18_support/50594.cc: New.
	* testsuite/ext/profile/mutex_extensions_neg.cc: Adjust dg-error
	line number.

From-SVN: r179863
2011-10-12 18:40:58 +00:00
Emil Wojak
92b2342a6e re PR libstdc++/50661 (std::equal should use more efficient version for arrays of pointers)
2011-10-11  Emil Wojak  <emil@wojak.eu>

	PR c++/50661
	* include/bits/stl_algobase.h (equal): Compare arrays of pointers
	too with memcmp.

From-SVN: r179801
2011-10-11 12:39:18 +00:00
Benjamin Kosnik
50da34bb1b re PR libstdc++/49818 (libsupc++ does not export __cxa_get_globals or related functions)
2011-10-10  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/49818
	* config/abi/pre/gnu.ver (CXXABI_1.3.6): Add symbols.
	* testsuite/util/testsuite_abi.cc: Same.
	* libsupc++/unwind-cxx.h: Move required eh API...
	* libsupc++/cxxabi.h: ... to here. Add required forward declarations.
	Use _GLIBCXX_NOTHROW.
	* libsupc++/pure.cc (__cxa_deleted_virtual): Add.
	* libsupc++/eh_alloc.cc: Use _GLIBCXX_NOTHROW.
	* libsupc++/eh_catch.cc: Same.
	* libsupc++/eh_globals.cc: Same.
	* libsupc++/eh_type.cc: Same.

From-SVN: r179769
2011-10-10 19:03:39 +00:00
Jonathan Wakely
920a97b75d testsuite_allocator.h (uneq_allocator): Add propagate_on_container_swap typedef for C++0x testing.
2011-10-07  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* testsuite/util/testsuite_allocator.h (uneq_allocator): Add
	propagate_on_container_swap typedef for C++0x testing.

From-SVN: r179665
2011-10-07 16:20:31 +00:00
Paolo Carlini
5847ec9338 assign_neg.cc: Tidy dg- directives, for C++0x testing too.
2011-10-06  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/27_io/ios_base/cons/assign_neg.cc: Tidy dg- directives,
	for C++0x testing too.
	* testsuite/27_io/ios_base/cons/copy_neg.cc: Likewise.
	* testsuite/ext/pb_ds/example/hash_resize_neg.cc: Likewise.
	* testsuite/24_iterators/istreambuf_iterator/requirements/
	base_classes.cc: Adjust for C++0x testing.
	* testsuite/ext/codecvt/char-1.cc: Avoid warnings in C++0x mode.
	* testsuite/ext/codecvt/char-2.cc: Likewise.
	* testsuite/ext/codecvt/wchar_t.cc: Likewise.

From-SVN: r179616
2011-10-06 14:43:26 +00:00
Paolo Carlini
57d1eadd79 pod_char_traits.h: Avoid warnings in C++0x mode when int_type is unsigned.
2011-10-05  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/ext/pod_char_traits.h: Avoid warnings in C++0x mode
	when int_type is unsigned.

From-SVN: r179587
2011-10-06 01:41:49 +00:00
Paolo Carlini
0e83f45aa6 re PR libstdc++/49561 ([C++0x] std::list::size complexity)
2011-10-04  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/49561
	* include/bits/stl_list.h (_List_base<>::_List_impl::_M_size):
	Add in C++0x mode.
	(_List_base<>::_List_impl, _List_base<>::_M_get_node,
	_List_base<>::_M_put_node, _List_base<>::_List_base(_List_base&&),
	list<>::size, list<>::swap, list<>::splice): Use it.
	(operator==(const list<>&, const list<>&)): Rewrite in C++0x mode.
	* include/bits/list.tcc (list<>::erase): Likewise.
	(list<>::merge): Adjust in C++0x mode.
	* testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
	Adjust dg-error line number.
	* testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
	Likewise.
	* testsuite/23_containers/list/requirements/dr438/
	constructor_1_neg.cc: Likewise.
	* testsuite/23_containers/list/requirements/dr438/
	constructor_2_neg.cc: Likewise.

From-SVN: r179528
2011-10-04 22:19:44 +00:00
Paolo Carlini
6caf3f7f12 48698.cc (g): Fix return type, avoid -Wall warning.
2011-10-04  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/20_util/bind/48698.cc (g): Fix return type, avoid -Wall
	warning.

From-SVN: r179526
2011-10-04 21:42:43 +00:00
Jonathan Wakely
73f0503101 alloc_traits.h (__alloc_traits::max_size): Define.
2011-10-04  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* include/ext/alloc_traits.h (__alloc_traits::max_size): Define.
	(__alloc_traits::rebind): Define.
	* include/bits/stl_vector.h: Use them.
	* testsuite/util/testsuite_allocator.h (SimpleAllocator): Define.
	* testsuite/23_containers/vector/allocator/minimal.cc: New.
	* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
	Adjust dg-error line numbers.
	* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
	Likewise.
	* testsuite/23_containers/vector/requirements/dr438/
	constructor_1_neg.cc: Likewise.
	* testsuite/23_containers/vector/requirements/dr438/
	constructor_2_neg.cc: Likewise.

From-SVN: r179523
2011-10-04 21:34:54 +01:00
Jonathan Wakely
491258e638 pointer_to.cc: Define equality operator and use.
2011-10-03  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* testsuite/20_util/pointer_traits/pointer_to.cc: Define equality
	operator and use.

From-SVN: r179473
2011-10-03 20:11:53 +01:00
Paolo Carlini
1c29961267 hashtable.h (_Hashtable<>::insert(value_type&&), [...]): Don't define here...
2011-10-03  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/hashtable.h (_Hashtable<>::insert(value_type&&),
	insert(const_iterator, value_type&&)): Don't define here...
	* include/bits/unordered_set.h (__unordered_set<>,
	__unordered_multiset<>): ... define here instead.

From-SVN: r179464
2011-10-03 15:28:47 +00:00
Jason Merrill
d602756341 re PR c++/35722 ([C++0x] Variadic templates expansion into non-variadic class template)
PR c++/35722
	Implement N2555 (expanding pack expansion to fixed parm list)
	* pt.c (coerce_template_parms): Allow expanding a pack expansion
	to a fixed-length argument list.
	(unify_pack_expansion): Handle explicit args properly.
	(unify) [TREE_VEC]: Handle pack expansions here.
	[TYPE_ARGUMENT_PACK]: Not here.
	(tsubst_pack_expansion): Don't try to do partial substitution.
	(pack_deducible_p): New.
	(fn_type_unification): Use it.
	(find_parameter_packs_r): Take the TYPE_MAIN_VARIANT
	of a type parameter.
	(check_non_deducible_conversion): Split from type_unification_real.
	(unify_one_argument): Split from type_unification_real...
	(unify_pack_expansion): ...and here.  Drop call_args_p parm.
	(type_unification_real, unify, more_specialized_fn): Adjust.

From-SVN: r179436
2011-10-02 17:45:01 -04:00
François Dumont
cdfa3dbb86 vector (vector<>::erase(iterator, iterator): Check iterators equality using normal iterators.
2011-10-01  François Dumont  <fdumont@gcc.gnu.org>

        * include/debug/vector (vector<>::erase(iterator, iterator): Check
        iterators equality using normal iterators.
        * include/debug/deque (deque<>::erase(iterator, iterator): Likewise.

From-SVN: r179414
2011-10-01 19:21:57 +00:00
Paolo Carlini
b24a983561 hashtable.h (_Hashtable<>::_Hashtable(_Hashtable&&)): Remove noexcept from declaration too.
2011-09-29  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/hashtable.h (_Hashtable<>::_Hashtable(_Hashtable&&)):
	Remove noexcept from declaration too.

From-SVN: r179360
2011-09-29 17:26:32 +00:00
Benjamin Kosnik
5e3a0ed1a7 *: Regenerate.
2011-09-27  Benjamin Kosnik  <bkoz@redhat.com>

	* doc/html/*: Regenerate.

	* doc/Makefile.am: Un-nest the ext output directory.
	* doc/Makefile.in: Regenerate.
	* spine.xml: Remove authors, add abstract for short
	contents. Rename to index.html for html output.
	* manual/spine.xml: Authors here, manual starts with index.html.
	* api.xml: Update.
	* faq.xml: Same.

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

From-SVN: r179304
2011-09-28 01:37:10 +00:00
Marcus Shawcroft
16fa5e238a tinfo.cc (type_info::operator==): Test __name instead of name().
2011-09-27  Marcus Shawcroft  <marcus.shawcroft@arm.com>

	* libsupc++/tinfo.cc (type_info::operator==): Test __name instead
	of name().

From-SVN: r179236
2011-09-27 06:03:58 +00:00
Paolo Carlini
a7cee01d32 re PR libstdc++/50529 ([C++0x] std::vector::erase invokes undefined behavior with empty range)
2011-09-26  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/50529
	* include/bits/vector.tcc (vector<>::erase(iterator, iterator)):
	Fix to do nothing if the range is empty.
	* include/bits/stl_bvector.h: Likewise.
	* include/bits/deque.tcc: Likewise.
	* include/debug/vector: Adjust.
	* include/debug/deque: Likewise.
	* testsuite/23_containers/vector/modifiers/erase/50529.cc: New.
	* testsuite/23_containers/deque/modifiers/erase/50529.cc: Likewise.
	* testsuite/23_containers/deque/modifiers/erase/3.cc: Adjust.

From-SVN: r179234
2011-09-27 02:39:34 +00:00
Benjamin Kosnik
2799d97293 re PR libstdc++/48698 (gnu-versioned-namespace problems)
2011-09-26  Benjamin Kosnik  <bkoz@redhat.com
            Jonathan Wakely  <jwakely.gcc@gmail.com>

	PR libstdc++/48698
	* acinclude.m4 (GLIBCXX_ENABLE_SYMVERS): Set libtool_VERSION here.
	* configure.ac: Move AC_SUBST of libtool_VERSION past call to
	GLIBCXX_ENABLE_SYMVERS.
	* configure: Regenerate.
	* include/bits/c++config: Use __7 as versioned namespace name.
	* config/abi/pre/gnu-versioned-namespace.ver: Change mangling as
	per above.
	* include/c_global/cwchar: Adjust nested namespaces.
	* testsuite/20_util/bind/48698.cc: Add test case.
	* testsuite/ext/profile/mutex_extensions_neg.cc: Change line number.

From-SVN: r179221
2011-09-27 00:02:54 +00:00
Paolo Carlini
a0ce4616fb revert: testsuite_error.h: Add empty default constructor to __gnu_test::test_category and...
2011-09-25  Paolo Carlini  <paolo.carlini@oracle.com>

	Revert (no longer necessary post r179130):

	2010-04-27  Fabien Chêne  <fabien.chene@gmail.com>

	* testsuite/util/testsuite_error.h: Add empty default constructor
	to __gnu_test::test_category and
	__gnu_test::test_derived_category.
	* src/future.cc: Add empty default constructor to
	future_error_category.
	* src/system_error.cc: Add default ctor to generic_error_category
	and system_error_category.

From-SVN: r179172
2011-09-25 20:58:46 +00:00
John Salmon
82582df651 re PR libstdc++/50510 ([C++0x] transposed variable names in std::seed_seq::generate)
2011-09-24  John Salmon  <john.salmon@deshaw.com>

	PR libstdc++/50510
	* include/bits/random.tcc (seed_seq::generate): Fix computation.

From-SVN: r179149
2011-09-24 22:34:50 +00:00
John Salmon
9d1f3ce6ff re PR libstdc++/50509 ([C++0x] incorrect code in std::seed_seq::generate)
2011-09-24  John Salmon  <john.salmon@deshaw.com>

	PR libstdc++/50509
	* include/bits/random.tcc (seed_seq::generate): Fix computation.

From-SVN: r179144
2011-09-24 18:28:36 +00:00
Benjamin Kosnik
696d4bc16e Makefile.am (stamp-epub-docbook): Fix image directory location.
2011-09-21  Benjamin Kosnik  <bkoz@redhat.com

	* doc/Makefile.am (stamp-epub-docbook): Fix image directory location.
	* doc/Makefile.in: Regenerate.

From-SVN: r179066
2011-09-21 23:46:36 +00:00
Paolo Carlini
fd1e62c239 limits.cc: Replace everywhere __int128_t -> __int128, and __uint128_t -> unsigned __int128.
2011-09-21  Paolo Carlini  <paolo.carlini@oracle.com>

	* src/limits.cc: Replace everywhere __int128_t -> __int128, and
	__uint128_t -> unsigned __int128.
	* include/std/type_traits: Likewise.
	* include/std/limits: Likewise.
	* testsuite/18_support/numeric_limits/dr559.cc: Likewise.
	* testsuite/18_support/numeric_limits/lowest.cc: Likewise.
	* testsuite/18_support/numeric_limits/40856.cc: Likewise.
	* testsuite/18_support/numeric_limits/max_digits10.cc: Likewise.
	* testsuite/util/testsuite_common_types.h: Likewise.
	* testsuite/20_util/make_signed/requirements/typedefs-1.cc: Likewise.
	* testsuite/20_util/make_signed/requirements/typedefs-2.cc: Likewise.
	* testsuite/20_util/is_floating_point/value.cc: Likewise.
	* testsuite/20_util/make_unsigned/requirements/typedefs-1.cc: Likewise.
	* testsuite/20_util/make_unsigned/requirements/typedefs-2.cc: Likewise.
	* testsuite/20_util/is_signed/value.cc: Likewise.
	* testsuite/20_util/is_unsigned/value.cc: Likewise.
	* testsuite/20_util/is_integral/value.cc: Likewise.
	* config/abi/pre/gnu.ver: Likewise.
	* acinclude.m4: Likewise.
	* configure: Regenerate.
	* config.h.in: Likewise.

From-SVN: r179044
2011-09-21 11:23:11 +00:00
Paolo Carlini
12bfa8bd29 re PR libstdc++/40856 (numeric_limits not specialized for __int128_t or __uint128_t)
2011-09-19  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/40856
	* include/std/limits (numeric_limits<__int128_t>,
	numeric_limits<__uint128_t>): Add.
	* src/limits.cc:Define.
	* config/abi/pre/gnu.ver: Export.
	* include/ext/typelist.h (_GLIBCXX_TYPELIST_CHAIN16, 20): Add.
	* testsuite/util/testsuite_common_types.h (integral_types_gnu): Add
	(limits_tl): Use it.
	* testsuite/18_support/numeric_limits/requirements/
	constexpr_functions.cc: Likewise.
	* testsuite/18_support/numeric_limits/40856.cc: New.
	* testsuite/18_support/numeric_limits/dr559.cc: Extend.
	* testsuite/18_support/numeric_limits/lowest.cc: Likewise.
	* testsuite/18_support/numeric_limits/max_digits10.cc: Likewise.
	* testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust dg-error
	line numbers.
	* testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
	* testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Likewise.
	* testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
	* testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
	Likewise.
	* testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
	Likewise.
	* testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
	Likewise.

From-SVN: r178969
2011-09-19 11:52:49 +00:00
Paolo Carlini
6d585f0114 re PR libstdc++/50441 ([C++0x] <type_traits> is missing GNU extension types)
2011-09-17  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/50441
	* acinclude.m4 ([GLIBCXX_ENABLE_INT128_FLOAT128]): Add.
	* configure.ac: Call it.
	* include/std/type_traits (__is_integral_helper<__int128_t>,
	__is_integral_helper<__uint128_t>,
	__is_floating_point_helper<__float128>,
	__make_unsigned<__int128_t>, __make_signed<__uint128_t>): Add.
	* testsuite/20_util/make_signed/requirements/typedefs-1.cc: Extend.
	* testsuite/20_util/make_signed/requirements/typedefs-2.cc: Likewise.
	* testsuite/20_util/make_unsigned/requirements/typedefs-1.cc: Likewise.
	* testsuite/20_util/make_unsigned/requirements/typedefs-2.cc: Likewise.
	* testsuite/20_util/is_signed/value.cc: Likewise.
	* testsuite/20_util/is_unsigned/value.cc: Likewise.
	* testsuite/20_util/is_integral/value.cc: Likewise.
	* testsuite/20_util/is_floating_point/value.cc: New.
	* testsuite/20_util/is_floating_point/requirements/typedefs.cc:
	Likewise.
	* testsuite/20_util/is_floating_point/requirements/
	explicit_instantiation.cc: Likewise.
	* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust
	dg-error line numbers.
	* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
	Likewise.
	* testsuite/20_util/declval/requirements/1_neg.cc: Likewise.
	* configure: Regenerate.
	* config.h.in: Likewise.

From-SVN: r178933
2011-09-17 23:53:26 +00:00
François Dumont
1c56f7cb72 hashtable.h (_Hashtable<>::__rehash_policy(const _RehashPolicy&)): Commit the modification of the policy only if no exception occured.
2011-09-17  François Dumont  <fdumont@gcc.gnu.org>

	* include/bits/hashtable.h (_Hashtable<>::__rehash_policy(const
	_RehashPolicy&)): Commit the modification of the policy only if no
	exception occured.
	* testsuite/23_containers/unordered_set/max_load_factor/robustness.cc:
	New.

From-SVN: r178927
2011-09-17 09:12:24 +00:00
Paolo Carlini
71743a68ec less_or_equal.cc: New.
2011-09-16  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/23_containers/array/comparison_operators/
	less_or_equal.cc: New.
	* testsuite/23_containers/array/comparison_operators/
	greater_or_equal.cc: Likewise.
	* testsuite/23_containers/array/comparison_operators/less.cc: Likewise.
	* testsuite/23_containers/array/comparison_operators/equal.cc: Likewise.
	* testsuite/23_containers/array/comparison_operators/not_equal.cc:
	Likewise.
	* testsuite/23_containers/array/comparison_operators/greater.cc:
	Likewise.
	* testsuite/23_containers/array/iterators/end_is_one_past.cc: Likewise.
	* testsuite/23_containers/array/capacity/empty.cc: Likewise.
	* testsuite/23_containers/array/capacity/max_size.cc: Likewise.
	* testsuite/23_containers/array/capacity/size.cc: Likewise.
	* testsuite/23_containers/array/tuple_interface/tuple_element.cc:
	Likewise.
	* testsuite/23_containers/array/tuple_interface/tuple_size.cc:
	Likewise.
	* testsuite/23_containers/array/element_access/at_out_of_range.cc:
	Likewise.
	* testsuite/23_containers/array/element_access/back.cc: Likewise.
	* testsuite/23_containers/array/element_access/front.cc: Likewise.
	* testsuite/23_containers/array/element_access/data.cc: Likewise.
	* testsuite/23_containers/array/cons/aggregate_initialization.cc:
	Likewise.
	* testsuite/23_containers/array/requirements/zero_sized_arrays.cc:
	Likewise.
	* testsuite/23_containers/array/requirements/contiguous.cc: Likewise.
	* testsuite/23_containers/array/requirements/member_swap.cc: Likewise.
	* testsuite/23_containers/array/specialized_algorithms/swap.cc:
	Likewise.
	* testsuite/23_containers/array/constexpr_get.cc: Move...
	* testsuite/23_containers/array/tuple_interface/constexpr_get.cc:
	... here.
	* testsuite/23_containers/array/requirements/get.cc: Move...
	* testsuite/23_containers/array/tuple_interface/get: ... here.
	* testsuite/23_containers/array/at_neg.cc: Move...
	* testsuite/23_containers/array/element_access: ... here.
	* testsuite/23_containers/array/requirements/constexpr_functions.cc:
	Move...
	* testsuite/23_containers/array/capacity: ... here.
	* testsuite/23_containers/array/requirements/
	constexpr_element_access.cc: Move...
	* testsuite/23_containers/array/element_access: ... here.

	* testsuite/20_util/duration/cons/1_neg.cc: Avoid -Wall warnings.
	* testsuite/20_util/tuple/creation_functions/constexpr.cc: Likewise.
	* testsuite/20_util/pair/make_pair/constexpr.cc: Likewise.
	* testsuite/20_util/time_point/nonmember/constexpr.cc: Likewise.
	* testsuite/23_containers/bitset/operations/constexpr.cc: Likewise.

	* testsuite/20_util/duration/cons/1_neg.cc: Discard bogus warning.
	* testsuite/20_util/forward/1_neg.cc: Likewise.

From-SVN: r178911
2011-09-16 16:28:31 +00:00
Paolo Carlini
fae3f4598a tuple (make_tuple, [...]): Declare constexpr.
2011-09-15  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/tuple (make_tuple, forward_as_tuple): Declare constexpr.
	(_Tuple_impl<>::_Tuple_impl(_Tuple_impl<>&&)): Likewise.
	* testsuite/20_util/tuple/creation_functions/constexpr.cc: Enable
	make_tuple test.
	* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Adjust dg-warning
	line number.

From-SVN: r178904
2011-09-16 00:41:33 +00:00
François Dumont
7e5ac0a4f5 hashtable.h (_Hashtable<>::_M_rehash): Take and restore hash policy _M_prev_resize on exception.
2011-09-14  François Dumont  <fdumont@gcc.gnu.org>
	    Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/hashtable.h (_Hashtable<>::_M_rehash): Take and restore
	hash policy _M_prev_resize on exception.
	(_Hashtable<>::_M_insert_bucket): Capture hash policy next resize
	before using it and use latter method to have it restored on exception.
	(_Hashtable<>::_M_insert(_Arg&& __v, std::false_type): Likewise.
	(_Hashtable<>::insert(_InputIterator, _InputIterator): Likewise.
	(_Hashtable<>::rehash): Likewise.
	* testsuite/23_containers/unordered_set/insert/hash_policy.cc: New.
	* testsuite/23_containers/unordered_multiset/insert/hash_policy.cc:
	Likewise.


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

From-SVN: r178861
2011-09-14 19:50:20 +00:00
Paul Brook
1e874273f8 arm.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
2011-09-13  Paul Brook  <paul@codesourcery.com>
 
	gcc/
	* config/arm/arm.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
	(ARM_TARGET2_DWARF_FORMAT): Provide default definition.
	* config/arm/linux-eabi.h (ARM_TARGET2_DWARF_FORMAT): Define.
	* config/arm/symbian.h (ARM_TARGET2_DWARF_FORMAT): Define.
	* config/arm/uclinux-eabi.h(ARM_TARGET2_DWARF_FORMAT): Define.
	* config/arm/t-bpabi (EXTRA_HEADERS): Add unwind-arm-common.h.
	* config/arm/t-symbian (EXTRA_HEADERS): Add unwind-arm-common.h.
	* config/c6x/c6x.c (c6x_output_file_unwind): Don't rely on dwarf2 code
	enabling unwind tables.
	(c6x_debug_unwind_info): New function.
	(TARGET_ARM_EABI_UNWINDER): Define.
	(TARGET_DEBUG_UNWIND_INFO): Define.
	* config/c6x/c6x.h (DWARF_FRAME_RETURN_COLUMN): Define.
	(TARGET_EXTRA_CFI_SECTION): Remove.
	* config/c6x/t-c6x-elf (EXTRA_HEADERS): Set.
	* ginclude/unwind-arm-common.h: New file.

	libgcc/
	* config.host (tic6x-*-*): Add c6x/t-c6x-elf.  Set unwind_header.
	* unwind-c.c (PERSONALITY_FUNCTION): Use UNWIND_POINTER_REG.
	* unwind-arm-common.inc: New file.
	* config/arm/unwind-arm.c: Use unwind-arm-common.inc.
	* config/arm/unwind-arm.h: Use unwind-arm-common.h.
	(_GLIBCXX_OVERRIDE_TTYPE_ENCODING): Define.
	* config/c6x/libunwind.S: New file.
	* config/c6x/pr-support.c: New file.
	* config/c6x/unwind-c6x.c: New file.
	* config/c6x/unwind-c6x.h: New file.
	* config/c6x/t-c6x-elf: New file.


	libstdc++-v3/
	* libsupc++/eh_arm.cc (__cxa_end_cleanup): Add C6X implementation.
	* libsupc++/eh_call.cc (__cxa_call_unexpected): Set rtti_base.
	* libsupc++/eh_personality.cc (NO_SIZE_OF_ENCODED_VALUE): Remove
	__ARM_EABI_UNWINDER__ check.
	(parse_lsda_header): Check _GLIBCXX_OVERRIDE_TTYPE_ENCODING.
	(get_ttype_entry): Use generic implementation on ARM EABI.
	(check_exception_spec): Use _Unwind_decode_typeinfo_ptr and
	UNWIND_STACK_REG.
	(PERSONALITY_FUNCTION): Set ttype_base.

From-SVN: r178808
2011-09-13 12:48:33 +00:00