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
5ee360d069
acinclude.m4 (GLIBCXX_CHECK_SC_NPROC_ONLN): Define.
...
* acinclude.m4 (GLIBCXX_CHECK_SC_NPROC_ONLN): Define.
(GLIBCXX_CHECK_PTHREADS_NUM_PROCESSORS_NP): Define.
(GLIBCXX_CHECK_SYSCTL_HW_NCPU): Define.
* configure.ac: Use new checks.
* configure: Regenerate.
* config.h.in: Regenerate.
* src/thread.cc: Check new config macros.
* testsuite/lib/libstdc++.exp: Likewise.
From-SVN: r181084
2011-11-07 13:45:03 +00:00
Jonathan Wakely
3cc227e5bf
* config/abi/pre/gnu.ver: Fix exports for string::pop_back.
...
From-SVN: r181081
2011-11-07 11:36:04 +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
Jonathan Wakely
55d2e499d6
backwards_compatibility.xml: Fix autoconf tests for C++11 compiler features and library headers.
...
* doc/xml/manual/backwards_compatibility.xml: Fix autoconf tests for
C++11 compiler features and library headers. Add stable id
attributes. Use <filename> element for headers and surround in angle
brackets. Use <classname> for classes.
* doc/html/*: Regenerate.
From-SVN: r181047
2011-11-06 23:25:25 +00:00
Jonathan Wakely
57899d2fc5
status_cxx2011.xml: Document <cuchar> and <cstdalign> as missing.
...
* doc/xml/manual/status_cxx2011.xml: Document <cuchar> and
<cstdalign> as missing.
From-SVN: r181045
2011-11-06 22:10:41 +00:00
Jonathan Wakely
f25481f470
faq.xml: Replace references to C++0x with C++11.
...
* doc/xml/faq.xml: Replace references to C++0x with C++11.
* doc/xml/manual/intro.xml: Likewise.
* doc/xml/manual/backwards_compatibility.xml: Likewise.
* doc/xml/manual/shared_ptr.xml: Likewise.
* doc/xml/manual/configure.xml: Likewise.
* doc/xml/manual/evolution.xml: Likewise.
* doc/xml/manual/using.xml: Likewise.
* doc/xml/manual/strings.xml: Likewise.
* doc/xml/manual/debug_mode.xml: Likewise.
* doc/xml/manual/policy_data_structures.xml: Likewise.
* doc/xml/manual/extensions.xml: Likewise.
* doc/xml/manual/diagnostics.xml: Likewise.
* doc/xml/manual/test.xml: Likewise.
* doc/xml/manual/status_cxx200x.xml: Likewise, and rename to...
* doc/xml/manual/status_cxx2011.xml: Here.
* doc/Makefile.am: Rename status_cxx200x.xml.
* doc/Makefile.in: Regenerate.
* doc/html/*: Regenerate.
From-SVN: r181041
2011-11-06 20:15:53 +00:00
François Dumont
ba3aa0e6c7
41975.cc: Add tests to check performance with or without cache of hash code and with...
...
2011-11-06 François Dumont <fdumont@gcc.gnu.org>
* testsuite/performance/23_containers/insert_erase/41975.cc: Add
tests to check performance with or without cache of hash code and with
string type that has a costlier hash functor than int type.
From-SVN: r181037
2011-11-06 17:16:00 +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
e940f96ffc
* doc/xml/manual/test.xml: Fix dg-warning examples.
...
From-SVN: r181023
2011-11-06 00:51:17 +00:00
Jonathan Wakely
7c09269050
re PR libstdc++/44436 ([C++0x] Implement emplace* in associative containers)
...
PR libstdc++/44436
* doc/xml/manual/status_cxx200x.xml: Document emplace members are
missing.
From-SVN: r181022
2011-11-06 00:29:36 +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
801fe0bb11
run_doxygen: Fix sed quoting.
...
2011-11-04 Benjamin Kosnik <bkoz@redhat.com>
* scripts/run_doxygen: Fix sed quoting.
From-SVN: r180978
2011-11-04 19:39:23 +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
Benjamin Kosnik
b22e43930f
*: Regenerate.
...
2011-11-03 Benjamin Kosnik <bkoz@redhat.com>
* doc/html/*: Regenerate.
From-SVN: r180837
2011-11-03 17:50:14 +00:00
Richard B. Kreckel
7f9876b26c
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: r180788
2011-11-02 18:43:42 +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
Benjamin Kosnik
08624e906d
c++config: Add tr2 to versioned namespaces.
...
2011-11-02 Benjamin Kosnik <bkoz@redhat.com>
* include/bits/c++config: Add tr2 to versioned namespaces.
* scripts/run_doxygen: Adjust generated man files as well.
* testsuite/ext/profile/mutex_extensions_neg.cc: Adjust line numbers.
From-SVN: r180760
2011-11-02 04:23:33 +00:00
Jonathan Wakely
376d7c51ec
future (promise): Add constructors for uses-allocator construction from rvalue promise.
...
* include/std/future (promise): Add constructors for uses-allocator
construction from rvalue promise.
(packaged_task): Implement LWG 2067. Add additional constructors for
uses-allocator construction.
* testsuite/30_threads/packaged_task/cons/3.cc: New.
* testsuite/30_threads/packaged_task/cons/alloc2.cc: New.
* testsuite/30_threads/promise/cons/alloc2.cc: New.
From-SVN: r180757
2011-11-02 00:53:12 +00:00
Jason Merrill
a7d5d7e221
Makefile.am (install-freestanding-headers): Install c++0x_warning.h.
...
* include/Makefile.am (install-freestanding-headers): Install
c++0x_warning.h.
* libsupc++/initializer_list: Include it.
From-SVN: r180727
2011-11-01 00:02:45 -04:00
Gerald Pfeifer
176d6eb070
acinclude.m4 (GLIBCXX_CONFIGURE): Refer to GNU/Linux.
...
* acinclude.m4 (GLIBCXX_CONFIGURE): Refer to GNU/Linux.
* configure: Regenerate.
From-SVN: r180717
2011-11-01 00:02:45 +00:00
Jason Merrill
97e3ad20b1
re PR c++/50920 (add a -std=c++11 option to the driver)
...
PR c++/50920
gcc/c-family
* c-common.h (cxx_dialect): Add cxx11 and cxx03.
* c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
and -Wc++11-compat.
* c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
gcc/cp
* class.c (check_field_decl): Change c++0x in diags to c++11.
* error.c (maybe_warn_cpp0x): Likewise.
* parser.c (cp_parser_diagnose_invalid_type_name): Likewise.
* pt.c (check_default_tmpl_args): Likewise.
libcpp
* include/cpplib.h (enum c_lang): Rename CLK_CXX0X to CLK_CXX11,
CLK_GNUCXX0X to CLK_GNUCXX11.
libstdc++-v3
* include/bits/c++0x_warning.h: Change -std=c++0x to -std=c++11.
From-SVN: r180707
2011-10-31 15:34:14 -04:00
Gerald Pfeifer
845f6341a3
prerequisites.xml: Refer to GCC (instead of gcc) and GNU/Linux.
...
* prerequisites.xml: Refer to GCC (instead of gcc) and GNU/Linux.
Remove an obsolete reference to a Red Hat release we do not
support any longer.
Refer to Debian GNU/Linux.
From-SVN: r180681
2011-10-30 15:33:11 +00:00
Gerald Pfeifer
391190a3f0
faq.xml (Who's in charge of it?): Refer to the Linux kernel instead of just Linux.
...
* faq.xml (Who's in charge of it?): Refer to the Linux kernel
instead of just Linux.
(How do I install libstdc++?): Refer to GNU/Linux instead of
just Linux.
From-SVN: r180679
2011-10-30 14:29:15 +00:00
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