<div dir="ltr">I don't think it's a bug if they only applied abi_tag to entities like this inline function that will be instantiated into every object file where they're used and whose address is irrelevant. It's essentially inconsequential whether you do the abi_tag mangling or not here, unless you're actually mixing different ABI versions for the same type in the same program. What this does mean is that you can't mix code compiled with libstdc++4.9 with dual-ABI code from GCC 5 onwards, but that was already the case in some corner cases due to other ABI breaks libstdc++ accidentally made prior to 5.0.<br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 16, 2016 at 10:50 AM, Dmitry Polukhin via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">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.</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 16, 2016 at 1:05 AM, Richard Smith via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>On Mon, Aug 15, 2016 at 2:53 PM, Renato Golin via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On 15 August 2016 at 22:43, Maria Gottschalk <<a href="mailto:gottschalk_maria@yahoo.de" target="_blank">gottschalk_maria@yahoo.de</a>> wrote:<br>
> But actually, there were abi tags already in 4.9.2, e.g.<br>
><br>
</span><span>> But then gcc-4.9.2 doesn't emit any, while now clang-3.9.0 does!<br>
<br>
</span>I'd risk say this is a bug in GCC. Or at least a pretty ugly<br>
implementation of something that should be simple.<br></blockquote><div><br></div></span><div>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.</div><span><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
We can't be compatible with all versions of GCC on what attributes<br>
they support and the compile-time flags that they use. This just<br>
doesn't scale.<br>
<br>
In a way, if you don't want ABI tags, use Clang 3.8 or before. If you<br>
do, use Clang 3.9 or after.<br>
<br>
I'm not sure there's a better way of doing this and creating a<br>
compile-time flag just to imitate GCC seems like the wrong way to go,<br>
IMO.<br>
<br>
cheers,<br>
--renato<br>
<div><div>______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
</div></div></blockquote></span></div><br></div></div>
<br>______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div></div>