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  <fdum...@gcc.gnu.org>

    * 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 <stdexcept> 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.

Reply via email to