From patchwork Mon Jun 23 20:30:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 363120 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 355AF14007F for ; Tue, 24 Jun 2014 06:30:32 +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:references:mime-version:content-type :in-reply-to; q=dns; s=default; b=TRbvUx7DaAF354yQTFC7d+A5ZE6Udc ZutijSPVTMGdevMupxnfo67iAR+DKWfRombMwY2ymcw6b+MFvll4kKLIgt1krj9q HOcTLdpQKHHN+vxd6+lU5lIk/Zz0GoiWJxFg5cHbBQQhc8YYFdws/vmqp8DCJ5f6 8rKPpRTKOIAQc= 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:references:mime-version:content-type :in-reply-to; s=default; bh=ck6sQMaa2bB5mHsfpw3cJE91oaY=; b=FBIj tKi8a91GktagLlbJ2ZWCZ2yvTSfqYHAk8W3UCcnh9/BOjiD01J9UR9J3RegucDpv uuYRy0iw86vl/J3yfCIZ5NuPGI6W4rShvyfZuCeJDqwHD1pPX/lmzC+y/aiqkP1+ 80V1YyPPAEi1YKNxQTx2BHuF/hf1JkgKbSMFyog= Received: (qmail 4642 invoked by alias); 23 Jun 2014 20:30:26 -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 4613 invoked by uid 89); 23 Jun 2014 20:30:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_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, 23 Jun 2014 20:30:21 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s5NKUJt3013388 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 23 Jun 2014 16:30:20 -0400 Received: from localhost (vpn1-7-131.ams2.redhat.com [10.36.7.131]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s5NKUIYX008738; Mon, 23 Jun 2014 16:30:19 -0400 Date: Mon, 23 Jun 2014 21:30:17 +0100 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: Re: [patch] libstdc++/61532 fix make_signed failures Message-ID: <20140623203017.GG8592@redhat.com> References: <20140623181826.GF8592@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20140623181826.GF8592@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) On 23/06/14 19:18 +0100, Jonathan Wakely wrote: >This fixes some more fallout from my make_signed changes and >improves the make_unsigned tests which were already fixed last month. > >Tested x86_64-linux and powerpc64-linux, committed to trunk. I'll be >making the same changes on the 4.9 branch shortly. This is the patch for the 4.9 branch, which combines a fix I forgot to backport (r210517) with today's fix for PR61532. Tested x86_64-linux, committed to the 4.9 branch. commit a00bdfff755b28cb26bf44b87e6accf52bb8008e Author: Jonathan Wakely Date: Mon Jun 23 21:07:23 2014 +0100 PR libstdc++/61532 * testsuite/20_util/make_signed/requirements/typedefs-1.cc: Do not apply the signed specifier to wchar_t. * testsuite/20_util/make_signed/requirements/typedefs-2.cc: Likewise. * testsuite/20_util/make_unsigned/requirements/typedefs-1.cc: Do not apply the unsigned specifier to wchar_t. * testsuite/20_util/make_unsigned/requirements/typedefs-2.cc: Likewise. diff --git a/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-1.cc b/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-1.cc index e3b84d6..5b094d9 100644 --- a/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-1.cc +++ b/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-1.cc @@ -29,6 +29,7 @@ void test01() using std::make_signed; using std::is_same; using std::is_signed; + using std::is_volatile; // Positive tests. typedef make_signed::type test2_type; @@ -53,7 +54,9 @@ void test01() #ifdef _GLIBCXX_USE_WCHAR_T typedef make_signed::type test23_type; - static_assert( is_same::value, + static_assert( is_signed::value + && is_volatile::value + && sizeof(test23_type) == sizeof(volatile wchar_t), "make_signed" ); #endif diff --git a/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-2.cc b/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-2.cc index 654b375..3f47dba 100644 --- a/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-2.cc +++ b/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-2.cc @@ -30,6 +30,8 @@ void test01() { using std::make_signed; using std::is_same; + using std::is_signed; + using std::is_volatile; // Positive tests. typedef make_signed::type test2_type; @@ -50,7 +52,9 @@ void test01() #ifdef _GLIBCXX_USE_WCHAR_T typedef make_signed::type test23_type; - static_assert(is_same::value, ""); + static_assert(is_signed::value + && is_volatile::value + && sizeof(test23_type) == sizeof(volatile wchar_t), ""); #endif typedef make_signed::type test24_type; diff --git a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-1.cc b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-1.cc index a893ede..de65504 100644 --- a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-1.cc +++ b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-1.cc @@ -29,6 +29,7 @@ void test01() using std::make_unsigned; using std::is_same; using std::is_unsigned; + using std::is_volatile; // Positive tests. typedef make_unsigned::type test2_type; @@ -49,7 +50,9 @@ void test01() #ifdef _GLIBCXX_USE_WCHAR_T typedef make_unsigned::type test23_type; - static_assert(is_same::value, ""); + static_assert(is_unsigned::value + && is_volatile::value + && sizeof(test23_type) == sizeof(volatile wchar_t), ""); #endif // Chapter 48, chapter 20. Smallest rank such that new unsigned type diff --git a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-2.cc b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-2.cc index 637b0c7..7801dca 100644 --- a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-2.cc +++ b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-2.cc @@ -30,6 +30,8 @@ void test01() { using std::make_unsigned; using std::is_same; + using std::is_unsigned; + using std::is_volatile; // Positive tests. typedef make_unsigned::type test2_type; @@ -50,7 +52,9 @@ void test01() #ifdef _GLIBCXX_USE_WCHAR_T typedef make_unsigned::type test23_type; - static_assert(is_same::value, ""); + static_assert(is_unsigned::value + && is_volatile::value + && sizeof(test23_type) == sizeof(volatile wchar_t), ""); #endif typedef make_unsigned::type test24_type;