[cfe-dev] Fix for PR4701
steve naroff
snaroff at apple.com
Fri Aug 14 14:08:08 PDT 2009
Hi David,
If you can include a test case that demonstrate what this patch fixes,
I believe I can give you a better approach...
Thanks,
snaroff
On Aug 14, 2009, at 4:56 PM, David Chisnall wrote:
> Hi Everyone,
>
> This patch provides an actual fix (as opposed to my previous
> attempt, which just moved the bugs around) for PR4701, where code
> accessing fields declared on Objective-C pseudo-builtin types id and
> Class broke.
>
> With this patch applied, all test pass and programs that include the
> GNU runtime's <obj/objc-api.h> compile correctly.
>
> I am not totally convinced by the approach here. If a redefinition
> of id or Class is encountered, this is stored any any attempt to
> access a field on one of these builtins is then implicitly cast to
> the real type. This is quite ugly, but seems less ugly than doing
> it the other way around (adding special cases to all of the
> Objective-C stuff to let struct objc_object* act as a receiver, and
> so on).
>
> David
> <clang.diff>_______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
More information about the cfe-dev
mailing list