[cfe-dev] Even more clang ideas

Ted Kremenek kremenek at apple.com
Sat Jul 26 10:34:53 PDT 2008


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- 
> aliasing.
>
> 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?  The  
original point with regards to strict-aliasing really concerns whether  
or not C99 strict-aliasing rules apply verbatim to pointers to  
Objective-C objects.



More information about the cfe-dev mailing list