On 11/06/2012 06:20 AM, Jakub Jelinek wrote:
On Mon, Nov 05, 2012 at 11:03:37PM -0500, Jason Merrill wrote:
As discussed at the Cauldron in Prague, this patch introduces a C++
abi_tag attribute which can be attached to a function or class to
modify its mangled name and avoid name collisions with earlier
versions with a different ABI.  It also adds a -Wabi-tag warning
option to make the compiler suggest adding ABI tags to classes with
subobjects that have tags.

Couldn't there be auto-propagation at least for classes that aren't forward
declared first?

There could, but then there would be a silent difference in behavior based on whether or not a class has a forward declaration. It would also mean we would need to instantiate templates in more situations in order to collect tags. I think this is the best solution, even though it isn't as comprehensive as we would like.

Also perhaps the documentation should perhaps reserve some names for the
implementation or uses compatible with that (say starting with underscore
or whatever), so that we could in libstdc++ use abi tag names without
a fear that it is used already by others for something else.

Sure, that makes sense.

Jason

Reply via email to