[cfe-commits] [PATCH] Add -fobjc-direct-class-refs
Jonathan Schleifer
js at webkeks.org
Fri Jul 20 07:45:50 PDT 2012
Am 19.07.2012 um 21:24 schrieb John McCall:
> Could you explain why you're testing hasSubscripting in one place and isSubscriptPointerArithmetic in another?
Yes, of course:
In SemaExpr, it checks if the subscript is pointer arithmetic. In SemaExprObjC, it checks if subscripting is allowed with the runtime. These are, IMHO, two different things: A runtime could disallow pointer arithmetic _AND_ subscripting. Imagine you target OS X 10.5 x86_64: You have the fragile ABI and thus pointer arithmetic is disallowed. However, subscripting is not supported by the runtime (well, actually the framework).
This is the reason why I decided it makes sense to use these two different runtime properties. They are, currently, the same, but you could change it in the way I just described later. I just wanted to be future-proof, that's all :). If you dislike it, feel free to reduce it to hasSubscripting.
Looking forward to get that integrated, already have two other patches ready :).
PS: I removed the two Davids from CC, as I think they are both subscribed and have no specific interest in this.
--
Jonathan
More information about the cfe-commits
mailing list