On 2015.04.06 at 16:45 -0400, Jason Merrill wrote:
> On 04/06/2015 09:23 AM, Markus Trippelsdorf wrote:
> > The issue is that clang uses the new libstdc++ ABI just fine. And before
> > this commit one could switch compilers without any problems...
> 
> Hmm, I suppose that when we switched to using inline namespaces for much 
> of the new ABI, switching compilers became more feasible; now tags are 
> only used for functions and variables, so you're less likely to run into 
> a problem, but it could still cause trouble if you use one of the tagged 
> functions in libstdc++ and get the one returning an old-ABI string.  So 
> I would be nervous about using clang with a dual-ABI libstdc++.  Does 
> clang use the new ABI by default with GCC 5 libstdc++? 

Yes, (unless you explicitly use -D_GLIBCXX_USE_CXX11_ABI=0).

I think most distros will use -D_GLIBCXX_USE_CXX11_ABI=0 for gcc-5, but
on my Gentoo testbox I've already switched to the new ABI. And before your
commit I could compile libraries with gcc and then use them with clang
(and vice versa) without any issues. Now every library function with a
std::string return type may cause linker errors.

-- 
Markus

Reply via email to