Default -fabi-version=0 for 4.9

Jeff Law law@redhat.com
Mon Mar 4 20:47:00 GMT 2013


On 03/04/2013 11:31 AM, Jason Merrill wrote:
> Our policy on mangling bugs has been that we don't change the mangling
> unless users explicitly specify -fabi-version.  Over time, this means
> that quite a few bugs have been found but continue to accumulate.  Most
> of these are C++11-specific, which means that as users use C++11 more
> frequently, the bugs are more likely to affect code in the wild.
>
> For templates, it also seems to me that mangling changes have very
> little negative impact; in most cases the worst that will happen is that
> a program ends up with two compatible versions of the same function. And
> none of the changes affect libstdc++.so.  For non-template code, any
> failures will be at link time, making them straightforward to deal with.
>
> The only non-mangling ABI change since version 2 is to argument
> promotion of C++11 scoped enums, and since we've been telling people
> that they need to rebuild all their C++11 code with every major release
> anyway, I don't think that's an obstacle.
>
> So, for GCC 4.9 I would like to propose that we switch the default ABI
> version to 0 so that by default we use the most correct mangling.  If
> people really need backward compatible mangling for some reason they can
> specify the flag appropriately.
Seems reasonable.  Presumably -Wabi will warn folks if they're doing 
something that results in a different mangling?

A wiki page we can link to when questions arise (as they always will) 
which includes your rationale above and any hints (such as -Wabi) users 
can use to detect problems, -fabi-version= guidance for those who wish 
to keep old behaviour, etc would be helpful.

jeff



More information about the Gcc mailing list