From: Jonathan Wakely Date: Mon, 28 Sep 2015 18:44:40 +0000 (+0100) Subject: LWG 2135: terminate() in condition_variable::wait() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=80400b0477598a858173d16c01abfd607a657722;p=gcc.git LWG 2135: terminate() in condition_variable::wait() * include/std/condition_variable (condition_variable::wait): Add noexcept. * src/c++11/condition_variable.cc (condition_variable::wait): Call std::terminate on error (DR 2135). From-SVN: r228217 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 50f6e8b694c..6b2738f3aed 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2015-09-28 Jonathan Wakely + + * include/std/condition_variable (condition_variable::wait): Add + noexcept. + * src/c++11/condition_variable.cc (condition_variable::wait): Call + std::terminate on error (DR 2135). + 2015-09-25 Ville Voutilainen Avoid creating dangling references in case of nested tuples diff --git a/libstdc++-v3/include/std/condition_variable b/libstdc++-v3/include/std/condition_variable index 4714774f1c3..f5f773492ad 100644 --- a/libstdc++-v3/include/std/condition_variable +++ b/libstdc++-v3/include/std/condition_variable @@ -89,7 +89,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION notify_all() noexcept; void - wait(unique_lock& __lock); + wait(unique_lock& __lock) noexcept; template void diff --git a/libstdc++-v3/src/c++11/condition_variable.cc b/libstdc++-v3/src/c++11/condition_variable.cc index cc0f6e4506a..fd850cb5211 100644 --- a/libstdc++-v3/src/c++11/condition_variable.cc +++ b/libstdc++-v3/src/c++11/condition_variable.cc @@ -48,12 +48,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } void - condition_variable::wait(unique_lock& __lock) + condition_variable::wait(unique_lock& __lock) noexcept { int __e = __gthread_cond_wait(&_M_cond, __lock.mutex()->native_handle()); if (__e) - __throw_system_error(__e); + std::terminate(); } void