On 2015.03.19 at 15:17 -0400, Jason Merrill wrote: > This patch makes some significant changes to attribute abi_tag. > > First, it allows explicit naming of tags on inline namespaces, which > previously always had a tag with the same name as the namespace itself; > this is still the default if no tag is specified. > > It also introduces automatic tagging of functions and variables with > tagged types where the tags are not already reflected in the mangled > name. I feel somewhat uneasy about this change, but I think it's the > right answer. -Wabi-tag will also warn about this so that people are > aware of it and can tag explicitly if they want to.
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. Another issue is that the -Wabi-tag warning isn't enabled by -Wall or even by -Wextra. -- Markus