From patchwork Mon Sep 28 18:49:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 523560 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id F3F6814016A for ; Tue, 29 Sep 2015 04:49:17 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=Wdc215yw; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=tZi8SvY9vArlVE/ItjxkYVNMqtZwyKvyXRqa65dU000uLQKblq13E UwMMy5mWzLGs87RijjNd9+P0DfIoXmAr4jLyLByA4VVwZu2TMTz10shp0ColsYGo nYfvRWJTYuwWrGh8NghzeWvq4i61VJ0lDBBBu6wJYxoj68dRaudpqg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=3O7KfI8P7R5uhSOs6tbxJ2EyLM4=; b=Wdc215ywcZH1w8Dm83ND TFo3aTXRG3rMjnDjBSa/i9b9nAuI0LIE4zgb/qtK7TIeLZmz3PbACOYPK/i8fiAn Wk6aN7mgkqOHJOGscWOCGPNnAOkF/j4Q1QjdVCDBUT9FJxu0uHrZZ69f7ATfSH13 ABBI1gyG/A1R5XKDeAqJptc= Received: (qmail 97254 invoked by alias); 28 Sep 2015 18:49:07 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 97230 invoked by uid 89); 28 Sep 2015 18:49:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 28 Sep 2015 18:49:04 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 7AC758E69C; Mon, 28 Sep 2015 18:49:03 +0000 (UTC) Received: from localhost (ovpn-116-138.ams2.redhat.com [10.36.116.138]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t8SIn2IQ021051; Mon, 28 Sep 2015 14:49:03 -0400 Date: Mon, 28 Sep 2015 19:49:02 +0100 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [patch] libstdc++/67726 LWG 2135: terminate() in condition_variable::wait() Message-ID: <20150928184902.GQ12094@redhat.com> MIME-Version: 1.0 Content-Disposition: inline X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.5.23 (2014-03-12) This was a change between C++11 and C++14. Tested powerpc64le-linux, committed to trunk. commit 023e16117005d8ca7dbb0e2e61059b59d7cc0e40 Author: Jonathan Wakely Date: Mon Sep 28 17:47:35 2015 +0100 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). diff --git a/libstdc++-v3/include/std/condition_variable b/libstdc++-v3/include/std/condition_variable index 4714774..f5f7734 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 cc0f6e4..fd850cb 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