This is the mail archive of the
mailing list for the GCC project.
Re: C++ PATCH for c++/65046 (ABI tags and functions/variables)
- From: Jason Merrill <jason at redhat dot com>
- To: Markus Trippelsdorf <markus at trippelsdorf dot de>
- Cc: gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 06 Apr 2015 08:41:59 -0400
- Subject: Re: C++ PATCH for c++/65046 (ABI tags and functions/variables)
- Authentication-results: sourceware.org; auth=none
- References: <550B20CD dot 3040708 at redhat dot com> <20150404113848 dot GA392 at x4>
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
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
Another issue is that the -Wabi-tag warning isn't enabled by -Wall or
even by -Wextra.
That's because I think the warning is mostly interesting for library
vendors; most users shouldn't need to worry about it.