From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 111607 invoked by alias); 2 Mar 2015 16:50:28 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 111557 invoked by uid 89); 2 Mar 2015 16:50:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 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, 02 Mar 2015 16:50:26 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t22GoPfQ024141 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 2 Mar 2015 11:50:25 -0500 Received: from localhost (ovpn-116-124.ams2.redhat.com [10.36.116.124]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t22GoNj2003370; Mon, 2 Mar 2015 11:50:24 -0500 Date: Mon, 02 Mar 2015 16:50:00 -0000 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: Re: [patch] libstdc++/64367 fix __sso_string to compile with clang Message-ID: <20150302165023.GE8789@redhat.com> References: <20141221151609.GK3134@redhat.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="Kj7319i9nmIyA2yE" Content-Disposition: inline In-Reply-To: <20141221151609.GK3134@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2015-03/txt/msg00073.txt.bz2 --Kj7319i9nmIyA2yE Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Content-length: 170 The same file has another instance of the same problem (which compiles with G++ in all modes, but Clang rejects in c++98 mode). Tested x86_64-linux, committed to trunk. --Kj7319i9nmIyA2yE Content-Type: text/x-patch; charset=us-ascii Content-Disposition: attachment; filename="patch.txt" Content-length: 655 commit 7cf52d6430d73c412f5205098c6cfe0ce7a3d0d5 Author: Jonathan Wakely Date: Thu Feb 26 13:31:48 2015 +0000 PR libstdc++/64367 * include/std/stdexcept (__sso_string): Don't use non-static member in sizeof. diff --git a/libstdc++-v3/include/std/stdexcept b/libstdc++-v3/include/std/stdexcept index bf3e618..2428919 100644 --- a/libstdc++-v3/include/std/stdexcept +++ b/libstdc++-v3/include/std/stdexcept @@ -80,7 +80,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION union { __str _M_s; - char _M_bytes[sizeof(_M_s)]; + char _M_bytes[sizeof(__str)]; }; __sso_string() _GLIBCXX_USE_NOEXCEPT; --Kj7319i9nmIyA2yE--