[cfe-dev] Does clang now emit [abi:cxx11] unconditionally when used with libstdc++?
Dmitry Polukhin via cfe-dev
cfe-dev at lists.llvm.org
Tue Aug 16 10:50:11 PDT 2016
I agree that it looks like a GCC bug that abi_tags are ignored in GCC
4.9.2. Anyway, if at some point we will want to implement it in Clang, I
think right approach is to implement -fabi_version flags and, if specified
ABI version is below GCC5, don't emit abi_tags in mangling.
On Tue, Aug 16, 2016 at 1:05 AM, Richard Smith via cfe-dev <
cfe-dev at lists.llvm.org> wrote:
> On Mon, Aug 15, 2016 at 2:53 PM, Renato Golin via cfe-dev <
> cfe-dev at lists.llvm.org> wrote:
>> On 15 August 2016 at 22:43, Maria Gottschalk <gottschalk_maria at yahoo.de>
>> > But actually, there were abi tags already in 4.9.2, e.g.
>> > But then gcc-4.9.2 doesn't emit any, while now clang-3.9.0 does!
>> I'd risk say this is a bug in GCC. Or at least a pretty ugly
>> implementation of something that should be simple.
> If it's only applied to an inline function, and that function did in fact
> take an ABI break in libstdc++ 4.9.2, then this seems unproblematic. If
> anything, our results will be marginally better than GCC 4.9.2's, because
> we'll do the right thing when mixing libstdc++ 4.9.2 and an earlier
> version. It looks like there is nothing to fix here.
>> We can't be compatible with all versions of GCC on what attributes
>> they support and the compile-time flags that they use. This just
>> doesn't scale.
>> In a way, if you don't want ABI tags, use Clang 3.8 or before. If you
>> do, use Clang 3.9 or after.
>> I'm not sure there's a better way of doing this and creating a
>> compile-time flag just to imitate GCC seems like the wrong way to go,
>> cfe-dev mailing list
>> cfe-dev at lists.llvm.org
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev