From patchwork Thu Sep 26 19:04:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 278249 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 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 170032C032E for ; Fri, 27 Sep 2013 05:05:14 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:in-reply-to:references:date:message-id:subject :from:to:content-type; q=dns; s=default; b=vpoXt7u5ky81iHN4ViD/r x7RQlXAWDTBnTjqEbfuTR/0/2UmgTgrzfAvhiETEPu89AamJuyDSjt0x9VR9yhL4 0bPCyYyndVHpw9DxdTkdnz9L2LH9+OjEy9JsasaxWnWp30AjL9tvMc8681x8BvED 51YzNNHP4hwzwhBGoZ3JtY= 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 :mime-version:in-reply-to:references:date:message-id:subject :from:to:content-type; s=default; bh=ZHR1JH0Io/iqr+CbjscCNoR5PeA =; b=hUPPI0UU0RufKmT/GoWJfUV4x+TYGhHVbbrLyfSTLSM5eSs4sQaQurvpkJ9 xnrZmzX+y/W70q6OqdWR5E1jdZaC8FzJmOOiH9Bmt3/DzKf/wEBB91i6dReotFR8 zYgTqLEZOZHo3iI/0z8Zux7GokwmdXqBgJ812PO1W28/QmJU= Received: (qmail 10888 invoked by alias); 26 Sep 2013 19:05:06 -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 10866 invoked by uid 89); 26 Sep 2013 19:05:06 -0000 Received: from mail-lb0-f181.google.com (HELO mail-lb0-f181.google.com) (209.85.217.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 26 Sep 2013 19:05:06 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.2 required=5.0 tests=AWL, BAYES_05, FREEMAIL_FROM, NO_RELAYS, SPAM_SUBJECT autolearn=no version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-lb0-f181.google.com Received: by mail-lb0-f181.google.com with SMTP id u14so1427431lbd.40 for ; Thu, 26 Sep 2013 12:04:32 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.112.29.147 with SMTP id k19mr5112582lbh.9.1380222272193; Thu, 26 Sep 2013 12:04:32 -0700 (PDT) Received: by 10.112.101.7 with HTTP; Thu, 26 Sep 2013 12:04:32 -0700 (PDT) In-Reply-To: References: Date: Thu, 26 Sep 2013 20:04:32 +0100 Message-ID: Subject: Re: [patch] fix libstdc++/55861 From: Jonathan Wakely To: "libstdc++" , gcc-patches On 19 January 2013 23:43, Jonathan Wakely wrote: > PR libstdc++/55861 > * include/std/future (_State_base::_S_check(const shared_ptr&)): > Fix return type. > (__basic_future::_M_get_result()): Const qualify. > (shared_future::get()): Likewise. > * testsuite/30_threads/shared_future/members/get.cc: Use const > objects. > > Tested x86_64-linux, committed to trunk. I've backported the first part of this, fixing the return type, to the 4.7 branch. Unfortunately it makes std::future unusable with clang, see http://llvm.org/bugs/show_bug.cgi?id=17375 Tested x86_64-linux, committed to the 4.7 branch. commit e2829e7c39c153cfc0d09cd8a8be14c5467c7730 Author: Jonathan Wakely Date: Thu Sep 26 10:11:29 2013 +0100 Backport from mainline 2013-01-19 Jonathan Wakely PR libstdc++/55861 * include/std/future (_State_base::_S_check(const shared_ptr&)): Fix return type. diff --git a/libstdc++-v3/include/std/future b/libstdc++-v3/include/std/future index 98c7b84..150c1af 100644 --- a/libstdc++-v3/include/std/future +++ b/libstdc++-v3/include/std/future @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2009, 2010, 2011, 2012 Free Software Foundation, Inc. +// Copyright (C) 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -456,7 +456,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __setter(promise* __prom); template - static bool + static void _S_check(const shared_ptr<_Tp>& __p) { if (!static_cast(__p))