RFC: PATCH to add abi_tag attribute

Florian Weimer fweimer@redhat.com
Fri Nov 23 09:58:00 GMT 2012


On 11/15/2012 02:51 AM, Jason Merrill wrote:
> On 11/11/2012 11:58 PM, Jason Merrill wrote:
>> On 11/11/2012 08:01 AM, Florian Weimer wrote:
>>> 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.
>>
>> Ah, yes; since virtual functions are called through the vtable the
>> signatures of virtual functions are also part of the class ABI, so the
>> base class also needs to be tagged.  I guess I should add that to
>> -Wabi-tag.
>
> Like so:

Okay, this might work in the sense that it flags the relevant cases. 
I'm still not convinced that this actually helps programmers that much 
because it pretty much separates the two worlds.  If this is the intend, 
surely there are simpler approaches (such as a command-line flag which 
changes the mangling for everything).

-- 
Florian Weimer / Red Hat Product Security Team



More information about the Gcc-patches mailing list