[cfe-dev] Even more clang ideas
clattner at apple.com
Sat Jul 26 11:41:04 PDT 2008
On Jul 26, 2008, at 10:34 AM, Ted Kremenek wrote:
> On Jul 25, 2008, at 10:09 PM, Chris Lattner wrote:
>>> Interesting. I think this illustrates my point that the strict
>>> aliasing rules in C99 don't really apply to Objective-C, at least in
>>> the implementation provided by GCC. This is clearly a deliberate
>>> choice, likely to avoid the issues you mentioned.
>> -fstrict-aliasing being off by default has more to do with its
>> implementation in GCC than it does the objc type system. I don't
>> think that any of the things John is talking about affect -fstrict-
>> When llvm-gcc (and eventually clang) supports type based alias
>> analysis, it will almost certainly be on by default, even on the mac.
> Cool. In that case, will strict-aliasing support for Objective-C
> take into consideration the subtyping relationships in Objective-C?
Almost certainly not. I'm not an objc expert, but my understanding is
that people often define proxy objects that don't necessarily derive
from the specified base class. The ObjC type system is mostly a
"recommendation" not a "requirement" afaik.
More information about the cfe-dev