[patch][pr22217] Use the most recent decl for mangling
rjmccall at apple.com
Fri Jan 23 11:34:15 PST 2015
> On Jan 23, 2015, at 11:04 AM, 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.
Sorry, do these open-source projects no longer accept patches? Adding section attributes after a definition does not seem defensible to me, and I would guess that the declarations are actually in the same file, just in the wrong order.
> “Build everything GCC can without modification” has never been a fundamental requirement for clang, though, and that appears to be your standard.
> 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.
There are ways to work with projects so that you can carefully roll out a diagnostic without completely shutting down development for everyone. This is a danger literally every time we add a warning. We’re not going to stop adding warnings.
> >You’ll need to remind me what it is that we can’t implement here.
You will note that IRGen is not computing the linkage in this Sema test. Linkage is a semantic property that the type-checker inherently has to care about. We can support this (by delaying the diagnostic about specializing on internal types) without changing anything in IRGen, but only by not caching linkage, either.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-commits