From patchwork Fri Dec 19 23:52:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Fran=C3=A7ois_Dumont?= X-Patchwork-Id: 423013 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 C187C140082 for ; Sat, 20 Dec 2014 10:53:04 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type; q=dns; s=default; b=KxjuDSyW8/IY+lnPB uxNYQFyEBPpAFuxDQwZBbfSI5CbYDT9cie4o8Ahc805Z8aAjpnlCJv5iapC4qMor 9CM9IeUi+abnmsCpwpwuAUu5TwhHIePyqeLzRekEp5hamxHK6jVEjgFJey1xp50L 9zkL0WdPXz1416cD2vXabo1tp4= 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 :message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type; s=default; bh=NeveN/4LpjxYIB1HEjhk9wM LDWw=; b=yVKEG46pBZuD5/8ndD9a+o68cjwy2cwNMiq+lBcrMxk2Zc7nOP0/mUX YZTOVtEcq+GqvToVu/rc0yHS/wIoOw9kcfOG46sJ6zZBycC6Zzc4rHJNESpV97C/ BDBdbKhqg27IHHQfxN7Onhf3t2/u3sBHThhdduW1eukOgVAui9IE= Received: (qmail 12169 invoked by alias); 19 Dec 2014 23:52:57 -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 12142 invoked by uid 89); 19 Dec 2014 23:52:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL, BAYES_50, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-wi0-f178.google.com Received: from mail-wi0-f178.google.com (HELO mail-wi0-f178.google.com) (209.85.212.178) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 19 Dec 2014 23:52:54 +0000 Received: by mail-wi0-f178.google.com with SMTP id em10so3286812wid.17; Fri, 19 Dec 2014 15:52:51 -0800 (PST) X-Received: by 10.194.187.235 with SMTP id fv11mr19438229wjc.16.1419033171699; Fri, 19 Dec 2014 15:52:51 -0800 (PST) Received: from [10.2.116.176] (lhc-ac1.isrighthere.com. [193.93.203.40]) by mx.google.com with ESMTPSA id ly9sm14437305wjb.24.2014.12.19.15.52.50 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Dec 2014 15:52:50 -0800 (PST) Message-ID: <5494BA51.4070004@gmail.com> Date: Sat, 20 Dec 2014 00:52:49 +0100 From: =?windows-1252?Q?Fran=E7ois_Dumont?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: libstdc++@gcc.gnu.org, gcc-patches Subject: Re: [patch] New std::string implementation References: <20141114154330.GH5191@redhat.com> <20141128152448.GQ5191@redhat.com> <20141128165532.GR5191@redhat.com> <20141219182333.GE3134@redhat.com> In-Reply-To: <20141219182333.GE3134@redhat.com> Hello Great news. However we need the following to make debug/profile modes happy. Shouldn't we use _GLIBCXX_ABI_TAG_CXX11 to tag the __cxx11 namespace ? 2014-12-20 François Dumont * include/bits/c++config: inline __cxx11 namespace within namespace __cxx1998. Ok to commit ? François On 19/12/2014 19:23, Jonathan Wakely wrote: > The powerpc64 ICE is fixed, so I'm committing the std::string ABI > transition patch. > > This replaces our venerable Copy-on-Write std::string with a > C++11-conforming* Small-String Optimized std::__cxx11::string. > > (* It's not quite 100% conforming, as it's missing some allocator > features. Of course. Always with the allocators. But that's only a > small fix to make next week.) > > Since the last version of this patch Jason has added support for > attribute((abi_tag)) on namespaces, so the new types can be defined in > an inline namespace that has the tag, rather than co-existing in > namespace std with the un-tagged types. This makes overloading and > exporting symbols a bit more straightforward as the different linkage > names can be expressed with a fully-qualified name without needing the > attribute. > > I've also added regex templates to the new __cxx11 namespace, as they > depend on std::string. > > There are now two new configure options, --disable-libstdcxx-dual-abi > and --with-default-libstdcxx-abi. The former disables all support for > the new __cxx11 ABI pieces. The latter is only relevant when the dual > ABI is enabled and can be used to make the old definitions the > default ones you get without defining the _GLIBCXX_USE_CXX11_ABI > macro. > > As described previously, the locale facets that depend on the > std::string ABI exist twice as "twinned facets" and if users replace > a twinned facet the library generates a shim to replace its twin. > > Also as described previously, the types in continue to use > the COW string, to ensure nothrow copying and ABI stability. > > The Python pretty printer problems I was seeing with the new string > turned out to be a GDB bug (17728). > > Target maintainers will see a *lot* of new exports at the latest > symbol version if they generate a new baseline-symbols.txt file. I > suggest waiting and doing that nearer the end of stage 3 in case there > are any fixes needed after this change. > > Bootstrapped and tested in various configurations on x86_64-linux and > powerpc64-linux. > > Committed to trunk! > > Phew. > Index: include/bits/c++config =================================================================== --- include/bits/c++config (revision 218970) +++ include/bits/c++config (working copy) @@ -277,9 +277,13 @@ // Non-inline namespace for components replaced by alternates in active mode. namespace __cxx1998 { -#if _GLIBCXX_INLINE_VERSION - inline namespace __7 { } -#endif +# if _GLIBCXX_INLINE_VERSION + inline namespace __7 { } +# endif + +# if _GLIBCXX_USE_CXX11_ABI + inline namespace __cxx11 __attribute__((abi_tag)) { } +# endif } // Inline namespace for debug mode.