[cfe-dev] [cfe-commits] r100942 - /cfe/trunk/lib/CodeGen/CGObjC.cpp
arplynn at gmail.com
Sun Apr 11 05:29:21 PDT 2010
Forgive me, but if (super) is really necessary for David, could it not be implemented as a preprocessor hack which just eats the parens, with associated warning, thus avoiding any codegen/parser/sema complications?
On 11 Apr 2010, at 03:33, Chris Lattner wrote:
> On Apr 10, 2010, at 5:00 PM, David Chisnall wrote:
>> On 11 Apr 2010, at 00:52, Chris Lattner wrote:
>>> I say no because it doesn't fit with the rest of the compiler, our current implementation of super is a ecological disaster and needs to be fixed, and it is obviously not been used enough to be reported yet. I would argue that cast of super is much more widely used than parenthesized super.
>> I suspect that it hasn't been reported because clang is only very recently able to compile most Objective-C code without random things breaking. Now that most things are working we're getting into tidying up the last bits.
> Uh, we've compiled a *lot* of objective-c code, and Apple has been shipping clang as a production quality c/objc compiler since last summer.
>>> This encourages broken code. Continuing to reject it forces people to fix their broken code. This is exactly what we did with cast of super, and the world is better place because of it.
>> Please can we define 'broken' here? I gave a use case for it. You have still, after three replies, not propose a way in which code that uses this idiom could be rewritten to work with clang.
> There are lots of ways, remove the parens from the macro or don't use a macro at all. Amazing.
>> Simply declaring code as broken when it has always worked in GCC and solves a specific problem is not a constructive approach.
> David, I respect you a lot, but I feel like I've given you several explanations of why this is wrong. I can't help that you don't want to hear it :)
> Have you looked at all the places and weird ad-hoc things that clang is doing w.r.t. super? It is a real mess right now, it isn't a keyword, it is special cased in a few bizarre places. I want to make it so the parser *just* handles this in the message dispatch parser as a context sensitive keyword. This is the semantic behavior of it, it should not be parsed as a general expression because it doesn't make sense.
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev