Re: Avoiding == and = mixup in if statements
Re: Avoiding == and = mixup in if statements
- Subject: Re: Avoiding == and = mixup in if statements
- From: Randall Meadows <email@hidden>
- Date: Fri, 21 May 2004 09:11:45 -0400
At 10:10 AM +0800 5/21/04, Christoffer Lerno wrote:
Java disallows stuff like
if (myObject=nil) { dosomething }
Is it possible to maybe disallow the same potential error when I'm
writing obj-c programs? Could I do something with the pre-processor
perhaps?
Use the -Wparentheses compiler flag (which is also enabled when you
use -Wall). (Read the man page for gcc to find out why this works.)
randy
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.