[cfe-dev] [cfe-commits] r100942 - /cfe/trunk/lib/CodeGen/CGObjC.cpp

Chris Lattner clattner at apple.com
Sat Apr 10 16:35:03 PDT 2010


On Apr 10, 2010, at 3:00 PM, David Chisnall wrote:

> On 10 Apr 2010, at 22:41, Chris Lattner wrote:
> 
>> By your logic, we would accept cast of super... But we don't and it is intentional.  This is the same issue.
> 
> 
> No, because cast of super is never a sensible thing to do.  The class of super is fixed at compile time, so casting it is always wrong.  If code does this, then it should be fixed.

The point is, super is not an expression, it is a magic keyword that affects messages sends.  It cannot be used in any other places that expressions are allowed, so it should not be part of the expression grammar.

-Chris



More information about the cfe-dev mailing list