From patchwork Tue Jul 8 13:22:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 367903 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 610A81400B0 for ; Tue, 8 Jul 2014 23:22:37 +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:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=dGCn92X+Q/jVOXhcwsNrG/zxGuEbAESve1L15dS8EX1Sz9cSmQWgq hMVi7yflYu3/ugtTl06cM3oAb9G3pkJHbYTy8FsHsboRDth+pJUi0P3st/F/v2XU GamnCbROQQLMzTLUWQR0tbeemDaxMN59L5dNYg32uoLjpQBD192m9I= 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=R/hY05Yw4R08j7tzlGJ6F+yyR58=; b=Yf18etVeSLzpDx2YE6oC DMmZ3tx/6jkk7edyEEDXttxGvOQn3RrR1Ep/RmU0Q6kYkwsK2EJ2DiL0/E1flwoX NFq2pkHRQpK3y1OymwL2CjGon/962SJ+HW/jbo+0DGoXRwdRdi5y7/Bmy+zpURv8 EIBgp/z1kgNwHTJCvwtf7UU= Received: (qmail 3046 invoked by alias); 8 Jul 2014 13:22:28 -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 3011 invoked by uid 89); 8 Jul 2014 13:22:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS 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; Tue, 08 Jul 2014 13:22:25 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s68DMNqq016008 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 8 Jul 2014 09:22:24 -0400 Received: from localhost (vpn1-6-247.ams2.redhat.com [10.36.6.247]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s68DMM1x012807; Tue, 8 Jul 2014 09:22:23 -0400 Date: Tue, 8 Jul 2014 14:22:22 +0100 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [patch] Some small libstdc++ fixes Message-ID: <20140708132222.GO4871@redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) A fix and some minor tweaks. Tested x86_64-linux, committed to trunk. commit 7f2475d59cc4ca4729341021e8b418ca77f7ccb2 Author: Jonathan Wakely Date: Tue Jul 8 13:33:02 2014 +0100 * include/bits/allocated_ptr.h (__allocated_ptr::operator=): Add missing return. * include/experimental/any: Remove unused header. * include/std/functional (_Maybe_wrap_member_pointer): Fix comments. * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error. * testsuite/util/testsuite_regex.h: Move include guard. diff --git a/libstdc++-v3/include/bits/allocated_ptr.h b/libstdc++-v3/include/bits/allocated_ptr.h index 5cdce20..4ae3836 100644 --- a/libstdc++-v3/include/bits/allocated_ptr.h +++ b/libstdc++-v3/include/bits/allocated_ptr.h @@ -73,7 +73,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } /// Release ownership of the owned pointer - __allocated_ptr& operator=(std::nullptr_t) noexcept { _M_ptr = nullptr; } + __allocated_ptr& + operator=(std::nullptr_t) noexcept + { + _M_ptr = nullptr; + return *this; + } /// Get the address that the owned pointer refers to. value_type* get() { return _S_raw_ptr(_M_ptr); } diff --git a/libstdc++-v3/include/experimental/any b/libstdc++-v3/include/experimental/any index 8f6e372..a69d006 100644 --- a/libstdc++-v3/include/experimental/any +++ b/libstdc++-v3/include/experimental/any @@ -41,7 +41,6 @@ #include #include #include -#include namespace std _GLIBCXX_VISIBILITY(default) { diff --git a/libstdc++-v3/include/std/functional b/libstdc++-v3/include/std/functional index e677c24..15247bf 100644 --- a/libstdc++-v3/include/std/functional +++ b/libstdc++-v3/include/std/functional @@ -1184,8 +1184,8 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type) /** * Maps member pointers into instances of _Mem_fn but leaves all - * other function objects untouched. Used by tr1::bind(). The - * primary template handles the non--member-pointer case. + * other function objects untouched. Used by std::bind(). The + * primary template handles the non-member-pointer case. */ template struct _Maybe_wrap_member_pointer @@ -1203,7 +1203,7 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type) /** * Maps member pointers into instances of _Mem_fn but leaves all - * other function objects untouched. Used by tr1::bind(). This + * other function objects untouched. Used by std::bind(). This * partial specialization handles the member pointer case. */ template diff --git a/libstdc++-v3/testsuite/experimental/any/misc/any_cast_neg.cc b/libstdc++-v3/testsuite/experimental/any/misc/any_cast_neg.cc index b93b039..9a12ec3 100644 --- a/libstdc++-v3/testsuite/experimental/any/misc/any_cast_neg.cc +++ b/libstdc++-v3/testsuite/experimental/any/misc/any_cast_neg.cc @@ -26,5 +26,5 @@ void test01() using std::experimental::any_cast; const any y(1); - any_cast(y); // { dg-error "qualifiers" "" { target { *-*-* } } 381 } + any_cast(y); // { dg-error "qualifiers" "" { target { *-*-* } } 380 } } diff --git a/libstdc++-v3/testsuite/util/testsuite_regex.h b/libstdc++-v3/testsuite/util/testsuite_regex.h index c2031e9..da20941 100644 --- a/libstdc++-v3/testsuite/util/testsuite_regex.h +++ b/libstdc++-v3/testsuite/util/testsuite_regex.h @@ -19,13 +19,13 @@ // . // +#ifndef _TESTSUITE_REGEX_H +#define _TESTSUITE_REGEX_H 1 + #include #include #include -#ifndef _TESTSUITE_REGEX_H -#define _TESTSUITE_REGEX_H 1 - namespace __gnu_test { // Test on a compilation of simple expressions, throw regex_error on error.