From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 113171 invoked by alias); 6 Apr 2015 13:23:23 -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 113160 invoked by uid 89); 6 Apr 2015 13:23:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.1 required=5.0 tests=AWL,BAYES_00,KAM_MXURI,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=no version=3.3.2 X-HELO: mail.ud10.udmedia.de Received: from ud10.udmedia.de (HELO mail.ud10.udmedia.de) (194.117.254.50) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 06 Apr 2015 13:23:13 +0000 Received: (qmail 23905 invoked from network); 6 Apr 2015 15:23:09 +0200 Received: from unknown (HELO x4) (ud10?360p3@91.65.248.138) by mail.ud10.udmedia.de with ESMTPSA (DHE-RSA-AES256-SHA encrypted, authenticated); 6 Apr 2015 15:23:09 +0200 Date: Mon, 06 Apr 2015 13:23:00 -0000 From: Markus Trippelsdorf To: Jason Merrill Cc: gcc-patches List Subject: Re: C++ PATCH for c++/65046 (ABI tags and functions/variables) Message-ID: <20150406132308.GC392@x4> References: <550B20CD.3040708@redhat.com> <20150404113848.GA392@x4> <55227F17.6080106@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55227F17.6080106@redhat.com> X-SW-Source: 2015-04/txt/msg00189.txt.bz2 On 2015.04.06 at 08:41 -0400, Jason Merrill wrote: > On 04/04/2015 07:38 AM, Markus Trippelsdorf wrote: > > This breaks compatibility with other compilers. Consider the case when > > a user compiles a library, that contains e.g. some member function with > > a std::string return type, with clang using gcc-5's libstdc++. It will > > be mangled without abi-tags, because clang doesn't support them. > > Now when the user switches back to gcc-5 and uses the libraries headers > > in a new project he will get undefined symbol errors when linking with > > the library, because gcc-5 adds an abi-tag to the member function > > declaration. > > I don't know what clang will do with GCC 5's libstdc++, but if it > doesn't support ABI tags then in the best case it will use the old ABI, > and so undefined symbol errors are exactly what we want, rather than > runtime corruption. The issue is that clang uses the new libstdc++ ABI just fine. And before this commit one could switch compilers without any problems... -- Markus