Le 27 févr. 2012 à 02:40, Graham Cox a écrit :

> 
> On 27/02/2012, at 12:13 PM, William Squires wrote:
> 
>> I prefer the "if (self = [super init])" combined form, myself.
> 
> 
> One potentially annoying thing about this form is that, if you compile with 
> plenty of warnings on, such as the possible unintended assignment warning (if 
> not, why not?) then this flags a warning.

clang knows about this special usage, and does not warn if you don't ask it to 
be to much pedantic.

Using the 2 following flags, it will warns about assignment used as condition, 
but not for if (self = [super init])

-Wparentheses -Wno-idiomatic-parentheses


-- Jean-Daniel





_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to