On 11/06/2012 05:03 AM, Jason Merrill wrote:
+The @code{abi_tag} attribute can be applied to a function or class
+declaration. It modifies the mangled name of the function or class to
+incorporate the tag name, in order to distinguish the function or
+class from an earlier version with a different ABI; perhaps the class
+has changed size, or the function has a different return type that is
+not encoded in the mangled name.
+A redeclaration of a function or class must not add new ABI tags,
+since doing so would change the mangled name.
I'm not sure if this sufficiently far-reaching. It seems that this
doesn't allow me to implement a virtual function which takes a
std::string parameter in new-ABI-mode when the base class is also used
in old-ABI-mode.
I really see no way to deal with this with either old-ABI-by-default
(without explicit annotations), annotations on legacy headers, or some
form of automated cross-translation-unit feedback.
--
Florian Weimer / Red Hat Product Security Team