Paolo Carlini
8535715d0f
re PR libstdc++/51438 (std::exception and derived classes are not compatible with std::nested_exception and C++11 in general)
...
2011-12-06 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/51438
* libsupc++/nested_exception.h (nested_exception::~nested_exception):
Declare noexcept.
* libsupc++/nested_exception.cc: Adjust.
* testsuite/18_support/nested_exception/51438.cc: New.
* testsuite/18_support/nested_exception/throw_with_nested.cc: Adjust.
* testsuite/18_support/nested_exception/rethrow_if_nested.cc:
Likewise.
* src/shared_ptr.cc: Use noexcept where appropriate.
* include/std/system_error: Likewise.
* include/std/functional: Likewise.
* include/bits/shared_ptr_base.h: Likewise.
* src/stdexcept.cc: Use _GLIBCXX_USE_NOEXCEPT where appropriate.
* include/std/stdexcept: Likewise.
* libsupc++/bad_cast.cc: Likewise.
* libsupc++/bad_typeid.cc: Likewise.
* libsupc++/eh_exception.cc: Likewise.
* libsupc++/typeinfo: Likewise.
* libsupc++/exception: Likewise.
* libsupc++/eh_ptr.cc: Likewise.
* libsupc++/bad_alloc.cc: Likewise.
* libsupc++/exception_ptr.h: Likewise.
* include/std/chrono: Use noexcept where appropriate.
* src/chrono.cc: Likewise.
From-SVN: r182064
2011-12-06 20:03:25 +00:00
Jonathan Wakely
62b547b5f6
re PR libstdc++/51183 (pair piecewise_construct_t constructor copies)
...
2011-12-06 Jonathan Wakely <jwakely.gcc@gmail.com>
Chris Jefferson <chris@bubblescope.net>
PR libstdc++/51183
* include/std/stl_pair.h (pair<>::__cons, pair<>::__do_cons): Remove.
(pair<>::pair(piecewise_construct_t, tuple<>, tuple<>): Only declare.
(pair<>::pair(tuple<>&, tuple<>&, _Index_tuple<>, _Index_tuple<>)):
Declare.
* include/std/tuple (pair<>::__cons, pair<>::__do_cons): Remove.
(pair<>::pair(tuple<>&, tuple<>&, _Index_tuple<>, _Index_tuple<>)):
Define.
(pair<>::pair(piecewise_construct_t, tuple<>, tuple<>): Define,
delegating to the latter.
* testsuite/20_util/pair/piecewise2.cc: New.
Co-Authored-By: Chris Jefferson <chris@bubblescope.net>
From-SVN: r182054
2011-12-06 15:13:04 +00:00
Jonathan Wakely
13901e4b28
type_traits: Doxygen improvements.
...
* include/std/type_traits: Doxygen improvements.
* include/bits/move.h: Likewise.
* include/tr1/type_traits: Likewise.
* include/tr2/type_traits: Likewise.
* testsuite/20_util/declval/requirements/1_neg.cc: Adjust dg-error
line numbers
* testsuite/20_util/forward/c_neg.cc: Likewise.
* testsuite/20_util/forward/f_neg.cc: Likewise.
* testsuite/20_util/make_signed/requirements/typedefs_neg.cc:
Likewise.
* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
Likewise.
From-SVN: r181993
2011-12-04 16:53:17 +00:00
Markus Trippelsdorf
e13afbace1
stl_heap.h (pop_heap): Check for non-empty range in overload taking a predicate.
...
* include/bits/stl_heap.h (pop_heap): Check for non-empty range in
overload taking a predicate.
* testsuite/25_algorithms/pop_heap/empty2_neg.cc: New.
Co-Authored-By: Jonathan Wakely <jwakely.gcc@gmail.com>
From-SVN: r181987
2011-12-04 13:21:53 +00:00
Jonathan Wakely
a8028a3ee8
macros.h (__glibcxx_check_non_empty_range): Define.
...
* include/debug/macros.h (__glibcxx_check_non_empty_range): Define.
* include/debug/debug.h (__glibcxx_requires_non_empty_range): Define.
* include/debug/formatter.h (__msg_non_empty_range): Add.
* src/debug.cc: Message text for __msg_non_empty_range.
* include/bits/stl_heap.h (pop_heap): Check for non-empty range.
* testsuite/25_algorithms/pop_heap/empty_neg.cc: New.
From-SVN: r181970
2011-12-03 15:35:35 +00:00
Paolo Carlini
f5ca3c3408
iomanip (put_money): Fix thinko, use __err local, like in, eg, basic_ostream::_M_insert.
...
2011-12-02 Paolo Carlini <paolo.carlini@oracle.com>
* include/std/iomanip (put_money): Fix thinko, use __err local,
like in, eg, basic_ostream::_M_insert.
From-SVN: r181931
2011-12-02 17:23:08 +00:00
Benjamin Kosnik
a152e96f01
acinclude.m4 (GLIBCXX_ENABLE_ATOMIC_BUILTINS): Remove size-specific macros.
...
2011-11-30 Benjamin Kosnik <bkoz@redhat.com>
* acinclude.m4 (GLIBCXX_ENABLE_ATOMIC_BUILTINS): Remove
size-specific macros. _GLIBCXX_ATOMIC_BUILTINS_1,
_GLIBCXX_ATOMIC_BUILTINS_2, _GLIBCXX_ATOMIC_BUILTINS_4,
_GLIBCXX_ATOMIC_BUILTINS_8. Use _GLIBCXX_ATOMIC_BUILTINS to
indicate use of C++11 atomic builtins.
* config.h.in: Regenerate.
* configure: Regenerate.
* include/Makefile.am (bits_sup_headers): Add atomic_lockfree_defines.h.
* include/Makefile.in: Regenerate.
* libsupc++/Makefile.am: Compile C++11 support with -std=gnu++0x.
* libsupc++/Makefile.in: Regenerate.
* include/bits/atomic_base.h: Move lock-free property macros...
* libsupc++/atomic_lockfree_defines.h: ...here.
* include/std/future: Use C++11 macros.
* libsupc++/eh_ptr.cc: Same.
* libsupc++/eh_throw.cc: Same.
* libsupc++/exception: Same.
* libsupc++/exception_ptr.h: Same.
* libsupc++/guard.cc: Same.
* libsupc++/nested_exception.cc: Same.
* libsupc++/nested_exception.h: Same.
* src/future.cc: Same.
* include/ext/atomicity.h: Use _GLIBCXX_ATOMIC_BUILTINS.
* doc/doxygen/user.cfg.in
* doc/xml/manual/concurrency_extensions.xml
* testsuite/18_support/exception_ptr/lifespan.cc
* testsuite/lib/libstdc++.exp
From-SVN: r181869
2011-12-01 02:20:32 +00:00
François Dumont
40207762a8
hashtable.h (_Hashtable<>::_M_rehash): Remove code useless now that the hashtable implementation put the hash code in...
...
2011-11-29 François Dumont <fdumont@gcc.gnu.org>
* include/bits/hashtable.h (_Hashtable<>::_M_rehash): Remove code
useless now that the hashtable implementation put the hash code in
cache if the hash functor throws.
* testsuite/23_containers/unordered_set/erase/1.cc: Enhance test by
checking also distance between begin and end iterators to validate
underlying data model.
* testsuite/23_containers/unordered_multiset/erase/1.cc: Likewise.
* testsuire/23_containers/unordered_map/erase/1.cc: Likewise.
* testsuite/23_containers/unordered_multimap/erase/1.cc: Likewise.
* testsuite/23_containers/unordered_multiset/erase/2.cc: New.
* testsuite/23_containers/unordered_multimap/erase/2.cc: New.
From-SVN: r181799
2011-11-29 07:45:58 +00:00
Andrew MacLeod
62bad7cd05
c-family
...
* c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
predefines in one place. Add LOCK_FREE predefines.
(c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
new func.
libstdc++-v3
* include/bits/atomic_base.h (ATOMIC_*_LOCK_FREE): Use new cpp
predefined macros.
* testsuite/29_atomics/headers/atomic/macros.cc: Add BOOL and POINTER
macro checks. Check for expected compile time values.
From-SVN: r181784
2011-11-28 20:28:23 +00:00
Paolo Carlini
1a30353af8
re PR libstdc++/51288 ([C++0x] get_money implementation is missing the sentry object (does not skip leading whitespace))
...
2011-11-28 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/51288
* include/std/iomanip (get_money, put_money): Use sentry.
* testsuite/27_io/manipulators/extended/get_money/char/51288.cc: New.
* testsuite/27_io/manipulators/extended/get_money/wchar_t/51288.cc:
Likewise.
* testsuite/27_io/manipulators/extended/put_money/char/51288.cc:
Likewise.
* testsuite/27_io/manipulators/extended/put_money/wchar_t/51288.cc:
Likewise.
From-SVN: r181775
2011-11-28 13:24:23 +00:00
François Dumont
da29608a7a
re PR libstdc++/41975 ([C++0x] [DR579] unordered_set::erase performs worse when nearly empty)
...
2011-11-23 François Dumont <fdumont@gcc.gnu.org>
PR libstdc++/41975
* include/bits/hashtable.h (_Hashtable<>): Major data model
modification to limit performance impact of empty buckets in
erase(iterator) implementation.
* include/bits/hashtable_policy.h (_Hashtable_iterator,
_Hashtable_const_iterator): Remove not used anymore.
* include/bits/hashtable_policy.h (_Prime_rehash_policy): Remove
_M_grow_factor, just use natural evolution of prime numbers. Add
_M_prev_size to know when the number of buckets can be reduced.
* include/bits/unordered_set.h (__unordered_set<>,
__unordered_multiset<>), unordered_map.h (__unordered_map<>,
__unordered_multimap<>): Change default value of cache hash code
template parameter, false for integral types with noexcept hash
functor, true otherwise.
* include/debug/unordered_map, unordered_set: Adapt transformation
from iterator/const_iterator to respectively
local_iterator/const_local_iterator.
* testsuite/performance/23_containers/copy_construct/unordered_set.cc:
New.
* testsuite/23_containers/unordered_set/instantiation_neg.cc: New.
* testsuite/23_containers/unordered_set/hash_policy/rehash.cc: New.
* testsuite/23_containers/unordered_multiset/cons/copy.cc: New.
* testsuite/23_containers/unordered_multiset/erase/1.cc,
24061-multiset.cc: Add checks on the number of bucket elements.
* testsuite/23_containers/unordered_multiset/insert/multiset_range.cc,
multiset_single.cc, multiset_single_move.cc: Likewise.
From-SVN: r181677
2011-11-23 20:30:18 +00:00
Jonathan Wakely
e02a544331
functional (is_placeholder, [...]): Add partial specializations for cv-qualified types.
...
* include/std/functional (is_placeholder, is_bind_expression): Add
partial specializations for cv-qualified types.
* include/tr1/functional (is_placeholder, is_bind_expression): Add
partial specializations for std::bind and std::placeholders and for
cv-qualified types.
* testsuite/20_util/bind/cv_quals_3.cc: New.
* testsuite/tr1/3_function_objects/bind/cv_quals.cc: New.
* testsuite/tr1/3_function_objects/bind/mixed.cc: New.
From-SVN: r181607
2011-11-22 00:40:47 +00:00
Daniel Krugler
5db25ab107
re PR libstdc++/51185 ([C++0x] false-positive results of std::is_constructible)
...
2011-11-21 Daniel Krugler <daniel.kruegler@googlemail.com>
PR libstdc++/51185
* include/std/type_traits (__is_base_to_derived_ref,
__is_lvalue_to_rvalue_ref): Fix.
* testsuite/20_util/is_constructible/51185.cc: New.
* testsuite/20_util/is_constructible/value-2.cc: Extend.
From-SVN: r181557
2011-11-21 11:21:13 +00:00
Paolo Carlini
a7cd7b6088
tuple (__conv_types, [...]): Remove.
...
2011-11-21 Paolo Carlini <paolo.carlini@oracle.com>
* include/std/tuple (__conv_types, __one_by_one_convertible,
__all_convertible): Remove.
(tuple<>::tuple(_UElements&&...),
tuple<>::tuple(const tuple<_UElements...>&),
tuple<>::tuple(tuple<_UElements...>&&)): Remove wa for c++/48322.
From-SVN: r181555
2011-11-21 10:47:37 +00:00
Jason Merrill
c67dd25689
re PR c++/48322 ([C++0x] Plural variadic parameter packs are not expanded well)
...
PR c++/48322
gcc/cp/
* cp-tree.h (PACK_EXPANSION_EXTRA_ARGS): New.
* cp-tree.def (EXPR_PACK_EXPANSION): Add an operand for it.
* pt.c (tsubst_pack_expansion): Set and use it.
(iterative_hash_template_arg): Hash it.
(template_args_equal): Compare it.
(comp_template_args_with_info): Handle nulls.
* tree.c (cp_walk_subtrees): Walk it.
* typeck.c (structural_comptypes): Compare it.
* ptree.c (cxx_print_type): Print it.
libstdc++-v3/
* include/std/tuple (tuple(_UElements&&...)): Fix SFINAE.
From-SVN: r181547
2011-11-20 21:04:54 -05:00
Jonathan Wakely
215c6c972d
binders.h: Fix examples in doxygen comments and suggest using std::bind instead.
...
* include/backward/binders.h: Fix examples in doxygen comments and
suggest using std::bind instead.
From-SVN: r181535
2011-11-20 21:14:56 +00:00
Paolo Carlini
fc09e5b6bd
bitset (operator[](size_t) const): Declare constexpr.
...
2011-11-19 Paolo Carlini <paolo.carlini@oracle.com>
* include/debug/bitset (operator[](size_t) const): Declare constexpr.
* include/profile/bitset: Likewise.
* testsuite/23_containers/bitset/operations/constexpr.cc: Split out
non portable bits to...
* testsuite/23_containers/bitset/operations/constexpr-2.cc: ... here.
From-SVN: r181506
2011-11-19 11:50:44 +00:00
Harti Brandt
919f402ca5
re PR libstdc++/51209 (The template _M_find_node in hashtable.h has a bad return value)
...
2011-11-18 Harti Brandt <hartmut.brandt@dlr.de>
PR libstdc++/51209
* include/bits/hashtable.h (_Hashtable<>::_M_find_node): Return
nullptr when no node is found.
* include/tr1/hashtable.h (_Hashtable<>::_M_find_node): Return
zero when no node is found.
From-SVN: r181480
2011-11-18 16:09:29 +00:00
Paolo Carlini
72f1c34bd4
hash-long-double-aux.cc: Rename to...
...
2011-11-18 Paolo Carlini <paolo.carlini@oracle.com>
* src/hash-long-double-aux.cc: Rename to...
* src/hash-long-double-tr1-aux.cc: ... this.
* src/compatibility-ldbl.cc: Adjust.
* src/hash_tr1.cc: Likewise.
* src/hash_c++0x.cc: Don't use src/hash-long-double-aux.cc.
* include/bits/functional_hash.h (hash<_Tp*>::operator(), specs
for integer types, hash<float>::operator(), hash<double>::operator(),
hash<long double>::operator()): Declare noexcept.
* include/debug/bitset (hash<__debug::bitset>::operator()): Likewise.
* include/debug/vector (hash<__debug::vector>::operator()): Likewise.
* include/std/system_error (hash<error_code>::operator()): Likewise.
* include/std/thread (hash<thread::id>::operator()): Likewise.
* include/std/bitset (hash<bitset>::operator()): Likewise.
* include/std/typeindex (hash<type_index>::operator()): Likewise.
* include/profile/bitset (hash<__profile::vector>::operator()):
Likewise.
* include/profile/vector (hash<__profile::vector>::operator()):
Likewise.
* include/ext/vstring.h (hash<__vstring>::operator(),
hash<__wvstring>::operator(), hash<__u16vstring>::operator(),
hash<__u32vstring>::operator()): Likewise.
* include/bits/shared_ptr.h (hash<shared_ptr>::operator()): Likewise.
* include/bits/shared_ptr_base.h (hash<__shared_ptr>::operator()):
Likewise.
* include/bits/unique_ptr.h (hash<unique_ptr>::operator()): Likewise.
* include/bits/basic_string.h (hash<string>::operator(),
hash<wstring>::operator(), hash<u16string>::operator(),
hash<u32string>::operator()): Likewise.
* include/bits/vector.tcc (hash<vector>::operator()): Likewise.
* include/bits/stl_bvector.h (hash<vector>::operator()): Likewise.
* libsupc++/typeinfo (type_info::hash_code): Use noexcept instead of
throw().
From-SVN: r181473
2011-11-18 12:37:06 +00:00
Andrew MacLeod
3b04e1e4c4
re PR libstdc++/51102 (missing macros in <atomic>)
...
2011-11-16 Andrew MacLeod <amacleod@redhat.com>
PR libstdc++/51102
* include/bits/atomic_base.h (ATOMIC_BOOL_LOCK_FREE,
ATOMIC_POINTER_LOCK_FREE): New. Add missing macros.
From-SVN: r181414
2011-11-16 15:43:15 +00:00
Paolo Carlini
6dc88283f6
re PR libstdc++/51142 ([C++0x] map::erase(key) doesn't compile with -D_GLIBCXX_DEBUG.)
...
2011-11-15 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/51142
* include/debug/unordered_map (unordered_map<>::erase(iterator),
unordered_multimap<>::erase(iterator)): Add, consistently with
LWG 2059.
* include/debug/unordered_set (unordered_set<>::erase(iterator),
unordered_multiset<>::erase(iterator)): Likewise.
* include/debug/map.h (map<>::erase(iterator)): Likewise.
* include/debug/multimap.h (multimap<>::erase(iterator)): Likewise.
* include/profile/map.h (map<>::erase(iterator)): Likewise.
* include/profile/multimap.h (multimap<>::erase(iterator)): Likewise.
* include/bits/hashtable.h (_Hashtable<>::erase(iterator)): Likewise.
* include/bits/stl_map.h (map<>::erase(iterator)): Likewise.
* include/bits/stl_multimap.h (multimap<>::erase(iterator)): Likewise.
* include/bits/stl_tree.h (_Rb_tree<>::erase(iterator)): Likewise.
* testsuite/23_containers/unordered_map/erase/51142.cc: New.
* testsuite/23_containers/multimap/modifiers/erase/51142.cc: Likewise.
* testsuite/23_containers/set/modifiers/erase/51142.cc: Likewise.
* testsuite/23_containers/unordered_multimap/erase/51142.cc: Likewise.
* testsuite/23_containers/unordered_set/erase/51142.cc: Likewise.
* testsuite/23_containers/multiset/modifiers/erase/51142.cc: Likewise.
* testsuite/23_containers/unordered_multiset/erase/51142.cc: Likewise.
* testsuite/23_containers/map/modifiers/erase/51142.cc: Likewise.
From-SVN: r181394
2011-11-15 23:28:49 +00:00
Jason Dick
402356d146
re PR libstdc++/51133 (Incorrect implementation of std::tr1::hermite())
...
2011-11-15 Jason Dick <dickphd@gmail.com>
PR libstdc++/51133
* include/tr1/poly_hermite.tcc (__poly_hermite_recursion): Fix
wrong sign in recursion relation.
From-SVN: r181381
2011-11-15 10:49:00 +00:00
Paolo Carlini
77addcb730
cmath (frexp, [...]): Do not mark constexpr, not viable anyway due to the pointer parameter.
...
2011-11-14 Paolo Carlini <paolo.carlini@oracle.com>
* include/c_global/cmath (frexp, modf, remquo): Do not mark constexpr,
not viable anyway due to the pointer parameter.
From-SVN: r181349
2011-11-14 11:29:26 +00:00
Paolo Carlini
9fb2982817
cmath (atan2, [...]): Simplify constraining on the return type.
...
2011-11-13 Paolo Carlini <paolo.carlini@oracle.com>
* include/c_global/cmath (atan2, fmod, pow, copysign, fdim,
fma, fmax, fmin, hypot, nextafter, remainder, remquo): Simplify
constraining on the return type.
* include/tr1/cmath (copysign, fdim, fma, fmax, fmin, hypot,
nextafter, remainder, remquo): Likewise.
From-SVN: r181341
2011-11-13 23:51:42 +00:00
Jonathan Wakely
306133e3d4
re PR libstdc++/51083 (TR1 [tr.c99.cmath.over] and C++11 [cmplx.over] overloads not constrained)
...
PR libstdc++/51083
* include/ext/type_traits.h (__promote): Only define __type member
for integral and floating point types, to prevent math functions
participating in overload resolution for other types.
(__promote_2, __promote_3, __promote_4): Use __promote in default
template argument values, so deduction only succeeds for integral and
floating point types.
* testsuite/26_numerics/cmath/51083.cc: New.
* testsuite/26_numerics/complex/51083.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/51083.cc: New.
* testsuite/tr1/8_c_compatibility/complex/51083.cc: New.
From-SVN: r181321
2011-11-12 15:57:03 +00:00
Andrew MacLeod
d660c35ea2
re PR middle-end/51038 (29_atomics/atomic_flag/clear/1.cc test_and_set/explicit.cc implicit.cc)
...
PR middle-end/51038
libstdc++-v3
* include/bits/atomic_base.h (atomic_thread_fence): Call built-in.
(atomic_signal_fence): Call built-in.
(test_and_set, clear): Call new atomic built-ins.
gcc
* builtins.c (expand_builtin_atomic_clear): New. Expand atomic_clear.
(expand_builtin_atomic_test_and_set): New. Expand atomic test_and_set.
(expand_builtin): Add cases for test_and_set and clear.
* sync-builtins.def (BUILT_IN_ATOMIC_TEST_AND_SET): New.
(BUILT_IN_ATOMIC_CLEAR): New.
testsuite
* gcc.dg/atomic-invalid.c: Add test for invalid __atomic_clear models.
* gcc.dg/atomic-flag.c: New. Test __atomic_test_and_set and
__atomic_clear.
From-SVN: r181271
2011-11-10 20:38:33 +00:00
Jonathan Wakely
5ed56cbbee
allocator.h (__shrink_to_fit_aux::_S_do_it): Create the new object with the same allocator.
...
* include/bits/allocator.h (__shrink_to_fit_aux::_S_do_it): Create
the new object with the same allocator.
* testsuite/23_containers/vector/capacity/shrink_to_fit2.cc: New.
From-SVN: r181235
2011-11-09 21:14:03 +00:00
Jonathan Wakely
6c23509047
unordered_map: Add missing copy constructors.
...
* include/profile/unordered_map: Add missing copy constructors.
* include/profile/unordered_set: Likewise.
From-SVN: r181196
2011-11-09 08:23:30 +00:00
Dodji Seketeli
bd0424fa93
PR c++/51027 - accepts alias-declaration without ';'
...
gcc/cp/
* parser.c (cp_parser_alias_declaration): Require ';' at the end
of the declaration.
libstdc++-v3/
* include/ext/pointer.h (rebind): Append missing ';'.
gcc/testsuite
* g++.dg/cpp0x/alias-decl-12.C: New test.
* g++.dg/ext/alias-decl-attr4.C: Append missing ';'.
From-SVN: r181195
2011-11-09 09:00:58 +01:00
Jonathan Wakely
425006751b
stl_vector.h (vector::_Alloc_traits): Make private.
...
* include/bits/stl_vector.h (vector::_Alloc_traits): Make private.
* include/debug/vector: Add allocator-extended constructors, ensure
move assignment and swap have same allocator propagation semantics
and exceptions specification as base class.
* include/profile/vector: Likewise.
(vector::push_back(_Tp&&)): Forward argument as rvalue.
* testsuite/23_containers/vector/debug/alloc_prop.cc: New.
* doc/xml/manual/status_cxx2011.xml: Clarify status of container
requirements with respect to allocators.
(status.iso.200x): Add anchor for old ID to preserve existing links.
From-SVN: r181189
2011-11-09 01:26:04 +00:00
Jonathan Wakely
a58a38b32c
shared_ptr_base.h (_Sp_counted_ptr): Make 'final'.
...
* include/bits/shared_ptr_base.h (_Sp_counted_ptr): Make 'final'.
(_Sp_counted_deleter): Make 'final'. Use allocator_traits.
(_Sp_counted_ptr_inplace): Make 'final'. Use allocator_traits.
Derive from _Sp_counted_ptr instead of _Sp_counted_deleter to use EBO
for the allocator.
(__shared_count, __shared_ptr): Use allocator_traits.
* include/std/future (__future_base::_Result_alloc): Make 'final'. Use
allocator traits.
(__future_base::_Task_state): Make 'final'.
(__future_base::_Deferred_state): Likewise.
(__future_base::_Async_state): Likewise.
* testsuite/20_util/shared_ptr/cons/alloc_min.cc: New.
* testsuite/20_util/shared_ptr/creation/alloc_min.cc: New.
* testsuite/20_util/shared_ptr/creation/private.cc: New.
* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Adjust line numbers.
* testsuite/30_threads/packaged_task/cons/alloc_min.cc: New.
* testsuite/30_threads/promise/cons/alloc_min.cc: New.
From-SVN: r181171
2011-11-08 16:45:54 +00:00
Paolo Carlini
e65cf3bc2d
re PR libstdc++/51018 (Test failures on NetBSD)
...
2011-11-07 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/51018
* include/profile/impl/profiler_node.h (__stack_hash::
operator()(__stack_t)): Just use std::size_t everywhere.
From-SVN: r181147
2011-11-08 01:39:44 +00:00
Jonathan Wakely
c4d9f41936
future (__future_base::_Ptr): Use alias-declaration.
...
* include/std/future (__future_base::_Ptr): Use alias-declaration.
(__is_same_pkgdtask): Rename to __constrain_pkgdtask and use decay
instead of remove_reference so that cv-quals are removed.
From-SVN: r181145
2011-11-08 01:23:53 +00:00
Ed Smith-Rowland
029ac5f967
stdc++.h: Add cstdalign.
...
2011-11-08 Ed Smith-Rowland <3dw4rd@verizon.net>
* include/precompiled/stdc++.h: Add cstdalign.
From-SVN: r181142
2011-11-08 01:02:06 +00:00
Paolo Carlini
31de4ba7df
complex (complex<>::real(), [...]): Remove redundant const qualifiers.
...
2011-11-07 Paolo Carlini <paolo.carlini@oracle.com>
* include/std/complex (complex<>::real(), complex<>::imag()):
Remove redundant const qualifiers.
From-SVN: r181141
2011-11-08 00:49:47 +00:00
Jonathan Wakely
7579d15b58
ptr_traits.h (__rebind): Replace with...
...
* include/bits/ptr_traits.h (__rebind): Replace with...
(rebind): Implement using alias-declaration.
* include/ext/pointer.h (__rebind): Replace with...
(rebind): Implement using alias-declaration.
* include/bits/alloc_traits.h (__rebind_alloc, __rebind_traits):
Replace with...
(rebind_alloc, rebind_traits): Implement using alias-declaration.
* include/ext/alloc_traits.h (rebind): Use rebind_alloc instead of
__rebind_alloc.
* include/std/scoped_allocator (rebind): Likewise.
From-SVN: r181139
2011-11-08 00:33:45 +00:00
Jonathan Wakely
48d8dd06b0
mutex (call_once): Store closure in __once_functor as bound function wrapper might not be copyable.
...
* include/std/mutex (call_once): Store closure in __once_functor
as bound function wrapper might not be copyable.
From-SVN: r181128
2011-11-07 22:26:15 +00:00
Andrew MacLeod
6577e39c94
atomic_base.h (atomic_thread_fence): Revert.
...
2011-11-07 Andrew MacLeod <amacleod@redhat.com>
* include/bits/atomic_base.h (atomic_thread_fence): Revert.
(atomic_signal_fence): Revert.
From-SVN: r181119
2011-11-07 21:32:52 +00:00
Andrew MacLeod
0669295b1e
atomic_base.h (atomic_thread_fence): Call builtin.
...
2011-11-07 Andrew MacLeod <amacleod@redhat.com>
libstdc++-v3
* include/bits/atomic_base.h (atomic_thread_fence): Call builtin.
(atomic_signal_fence): Call builtin.
(atomic_flag::test_and_set): Call __atomic_exchange when it is lockfree,
otherwise fall back to call __sync_lock_test_and_set.
(atomic_flag::clear): Call __atomic_store when it is lockfree,
otherwise fall back to call __sync_lock_release.
gcc
* doc/extend.texi: Docuemnt behaviour change for __atomic_exchange and
__atomic_store.
* optabs.c (expand_atomic_exchange): Expand to __sync_lock_test_and_set
only when originated from that builtin.
(expand_atomic_store): Expand to __sync_lock_release when originated
from that builtin.
* builtins.c (expand_builtin_sync_lock_test_and_set): Add flag that
expand_atomic_exchange call originated from here.
(expand_builtin_sync_lock_release): Add flag that expand_atomic_store
call originated from here.
(expand_builtin_atomic_exchange): Add origination flag.
(expand_builtin_atomic_store): Add origination flag.
* expr.h (expand_atomic_exchange, expand_atomic_store): Add boolean
parameters to indicate implementation fall back options.
From-SVN: r181111
2011-11-07 20:06:39 +00:00
Rainer Orth
9fbcc75d56
Return gthr-posix.h to libgcc (PR bootstrap/50982)
...
libgcc:
PR bootstrap/50982
* config/gthr-posix.h: Move ...
* gthr-posix.h: ... here.
* config/gthr-lynx.h: Reflect this.
* config/gthr-vxworks.h: Likewise.
* config/rs6000/gthr-aix.h: Likewise.
* configure.ac (target_thread_file): Likewise.
* configure: Regenerate.
libstdc++-v3:
PR bootstrap/50982
* include/Makefile.am (${host_builddir}/gthr-posix.h): Reflect
gthr-posix.h move.
* include/Makefile.in: Regenerate.
From-SVN: r181095
2011-11-07 16:34:31 +00:00
Jonathan Wakely
e0f0ee74f0
acinclude.m4: Check for <stdalign.h>
...
* acinclude.m4: Check for <stdalign.h>
* configure: Regenerate.
* config.h.in: Likewise.
* include/Makefile.am: Add <cstdalign>.
* include/Makefile.in: Regenerate.
* include/c_global/cstdalign: New.
* testsuite/18_support/headers/cstdalign/std_c++0x_neg.cc: New.
* doc/xml/manual/backwards_compatibility.xml: Update.
* doc/xml/manual/status_cxx2011.xml: Update.
From-SVN: r181076
2011-11-07 08:46:58 +00:00
Jonathan Wakely
ff02a38bc6
re PR libstdc++/50982 (AIX libstdc++ GTHREADS incompatibility)
...
PR libstdc++/50982
* include/std/mutex (__once_proxy): Use void parameter list to
work on implicit extern "C" systems.
From-SVN: r181072
2011-11-07 07:54:06 +00:00
Xinliang David Li
b9b8c6ae39
make __stl_prime_list in comdat
...
From-SVN: r181071
2011-11-07 07:43:46 +00:00
Jonathan Wakely
f1e09f0d14
basic_string.h (basic_string::at): Move adjacent to other overload.
...
* include/bits/basic_string.h (basic_string::at): Move adjacent to other
overload.
(basic_string::pop_back): Define.
* include/debug/string (__gnu_debug::basic_string::pop_back): Likewise.
* include/ext/vstring.h (__versa_string::pop_back): Likewise.
* config/abi/pre/gnu.ver: Add new symbols.
* testsuite/21_strings/basic_string/modifiers/char/pop_back.cc: New.
* testsuite/21_strings/basic_string/modifiers/wchar_t/pop_back.cc: New.
* testsuite/21_strings/basic_string/range_access.cc: Split to ...
* testsuite/21_strings/basic_string/range_access/char/1.cc: Here and ...
* testsuite/21_strings/basic_string/range_access/wchar_t/1.cc: Here.
* testsuite/ext/vstring/modifiers/char/pop_back.cc: New.
* testsuite/ext/vstring/modifiers/wchar_t/pop_back.cc: New.
From-SVN: r181049
2011-11-07 00:06:23 +00:00
Andrew Macleod
86951993f8
Check in patch/merge from cxx-mem-model Branch
...
From-SVN: r181031
2011-11-06 14:55:48 +00:00
Jonathan Wakely
eed33268ff
re PR libstdc++/49894 ([C++0x] Uniform initialization in constructor)
...
PR libstdc++/49894
PR bootstrap/50982
* include/std/mutex (once_flag): Use NSDMI.
From-SVN: r181013
2011-11-05 13:33:29 +00:00
Benjamin Kosnik
c3b0bfe175
doxygroups.cc: Add markup for namespace tr2.
...
2011-11-03 Benjamin Kosnik <bkoz@redhat.com>
* doc/doxygen/doxygroups.cc: Add markup for namespace tr2.
* include/tr2/bool_set: Adjust doxygen markup.
* include/tr2/dynamic_bitset: Same.
* include/tr2/type_traits: Same.
From-SVN: r180874
2011-11-03 22:23:35 +00:00
Richard B. Kreckel
af7c185869
re PR libstdc++/50880 (__complex_acosh() picks wrong complex branch)
...
2011-11-02 Richard B. Kreckel <kreckel@ginac.de>
Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/50880
* include/std/complex (__complex_acosh): Fix in a better way,
use Kahan's formula.
* include/tr1/complex (__complex_acosh): Likewise.
From-SVN: r180787
2011-11-02 18:43:26 +00:00
Rainer Orth
5d1c8e77cf
Move gthr to toplevel libgcc
...
gcc:
* gthr-single.h, gthr.h: Move to ../libgcc.
* gthr-aix.h: Move to ../libgcc/config/rs6000.
* gthr-dce.h: Move to ../libgcc/config/pa.
* gthr-lynx.h: Move to ../libgcc/config.
* gthr-mipssde.h: Move to ../libgcc/config/mips.
* gthr-posix.h: Move to ../libgcc/config.
* gthr-rtems.h: Likewise.
* gthr-tpf.h: Move to ../libgcc/config/s390.
* gthr-vxworks.h: Move to ../libgcc/config.
* gthr-win32.h: Move to ../libgcc/config/i386.
* configure.ac (gthread_flags): Remove
(gthr-default.h): Don't create.
(thread_file): Don't substitute.
* configure: Regenerate.
* Makefile.in (GCC_THREAD_FILE): Remove.
(GTHREAD_FLAGS): Remove.
(libgcc.mvars): Remove GTHREAD_FLAGS.
* config/t-vxworks (EXTRA_HEADERS): Remove.
gcc/po:
* EXCLUDES (gthr-aix.h, gthr-dce.h, gthr-posix.c, gthr-posix.h)
(gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h)
(gthr-win32.h, gthr.h): Remove.
libgcc:
* gthr-single.h, gthr.h: New files.
* config/gthr-lynx.h, config/gthr-posix.h., config/gthr-rtems.h,
config/gthr-vxworks.h, config/i386/gthr-win32.h,
config/mips/gthr-mipssde.h, config/pa/gthr-dce.h,
config/rs6000/gthr-aix.h, config/s390/gthr-tpf.h: New files.
* config/i386/gthr-win32.c: Include "gthr-win32.h".
* configure.ac (thread_header): New variable.
Set it depending on target_thread_file.
(gthr-default.h): Link from $thread_header.
* configure: Regenerate.
* Makefile.in (LIBGCC2_CFLAGS): Remove $(GTHREAD_FLAGS).
libgfortran:
* Makefile.am (AM_CPPFLAGS): Add
-I$(srcdir)/$(MULTISRCTOP)../libgcc, -I$(MULTIBUILDTOP)../libgcc.
* Makefile.in: Regenerate.
* acinclude.m4 (LIBGFOR_CHECK_GTHR_DEFAULT): Remove.
* configure.ac (LIBGFOR_CHECK_GTHR_DEFAULT): Likewise.
* configure: Regenerate.
* config.h.in: Regenerate.
libobjc:
* Makefile.in (INCLUDES): Add -I$(MULTIBUILDTOP)../libgcc.
* configure.ac (target_thread_file, HAVE_GTHR_DEFAULT): Remove.
* configure: Regenerate.
* config.h.in: Regenerate.
libstdc++-v3:
* acinclude.m4 (GLIBCXX_CONFIGURE): Determine and substitute
toplevel_builddir.
(GLIBCXX_ENABLE_THREADS): Remove glibcxx_thread_h,
HAVE_GTHR_DEFAULT, enable_thread.
(GLIBCXX_CHECK_GTHREADS): Reflect gthr move to libgcc.
* include/Makefile.am (thread_host_headers): Remove
${host_builddir}/gthr-tpf.h.
(${host_builddir}/gthr.h): Reflect gthr move to libgcc.
Use $<.
(${host_builddir}/gthr-single.h): Likewise.
(${host_builddir}/gthr-posix.h): Likewise.
(${host_builddir}/gthr-tpf.h): Remove.
(${host_builddir}/gthr-default.h): Likewise.
* configure, config.h.in: Regenerate.
* Makefile.in, doc/Makefile.in, include/Makefile.in,
libsupc++/Makefile.in, po/Makefile.in, python/Makefile.in,
src/Makefile.intestsuite/Makefile.in: Regenerate.
From-SVN: r180776
2011-11-02 15:28:43 +00:00
Paolo Carlini
3164517929
re PR libstdc++/50951 (state of subtract_with_carry_engine not saved correctly to output stream)
...
2011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/50951
* include/bits/random.tcc (operator<<(basic_ostream<>&,
const mersenne_twister_engine<>&): Output _M_p too.
(operator<<(basic_ostream<>&, const
subtract_with_carry_engine<>&): Likewise.
(operator>>(basic_istream<>&, mersenne_twister_engine<>&):
Reload it.
(operator>>(basic_istream<>&, subtract_with_carry_engine<>&):
Likewise.
* include/bits/random.h (mersenne_twister_engine<>::operator==):
Compare _M_p too.
(subtract_with_carry_engine<>::operator==): Compare _M_carry
and _M_p too.
(shuffle_order_engine<>::operator==): Compare _M_v(s) and _M_y too.
* testsuite/26_numerics/random/independent_bits_engine/
operators/serialize.cc: Extend.
* testsuite/26_numerics/random/subtract_with_carry_engine/
operators/serialize.cc: Likewise.
* testsuite/26_numerics/random/discard_block_engine/
operators/serialize.cc: Likewise.
* testsuite/26_numerics/random/mersenne_twister_engine/
operators/serialize.cc: Likewise.
* testsuite/26_numerics/random/linear_congruential_engine/
operators/serialize.cc: Likewise.
* testsuite/26_numerics/random/shuffle_order_engine/
operators/serialize.cc: Likewise.
From-SVN: r180764
2011-11-02 10:06:08 +00:00