[patch][pr22217] Use the most recent decl for mangling

Richard Smith richard at metafoo.co.uk
Fri Jan 23 11:28:25 PST 2015

On 23 Jan 2015 11:04, "Rafael Espíndola" <rafael.espindola at gmail.com> wrote:
>> How is it not a viable fight?  Is the section attribute coming from a
completely different place?  Or are you suggesting that it is never viable
to tell people that they ought to fix their code, no matter how
unnecessarily perverse it is?  A section should be an intrinsic part of an
definition, saying that you can’t define the same thing in multiple
inconsistent ways is not even slightly unreasonable.
> The bug first got reported to us while trying to build glibc. The bug
Richard noticed was fixed in gcc because it was breaking the linux kernel.
If anyone thinks it is productive to try to get them to change, go for it.
>> “Build everything GCC can without modification” has never been a
fundamental requirement for clang, though, and that appears to be your
>> PR16187 is an example that I would feel fairly comfortable diagnosing.
You could certainly construct a more challenging example, though.
> It is an example where we *were* diagnosing. Except that then we cannot
build firefox or chrome. You are also more than welcome to get them to
change because you don't like how gcc implemented an extension.
> It is not about being bug by bug compatible, it is about building *real*
software versus having a slower (compute visibility multiple times per
type) and fuzzier model for no reason other than not liking reality.
> This is not the same case as, for example, requiring "this->" in
dependent contexts, where our model was better (and eventually gcc
> >You’ll need to remind me what it is that we can’t implement here.
> test/SemaCXX/anonymous-struct.cpp

We can implement that (by performing lookahead after parsing an anonymous
class in a typedef and before parsing method bodies etc), we just don't do
so yet. This is also not just an IR generation problem, there are also
semantic reasons why we might care about linkage.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150123/acf3f239/attachment.html>

More information about the cfe-commits mailing list