Re: Warning flag for 'if (x = y)'
Re: Warning flag for 'if (x = y)'
- Subject: Re: Warning flag for 'if (x = y)'
- From: Prachi Gauriar <email@hidden>
- Date: Fri, 16 Jan 2004 13:42:44 -0600
On Jan 16, 2004, at 1:03 PM, Alastair Houghton wrote:
On 16 Jan 2004, at 18:00, Matt Gough wrote:
I just spent half an hour tracking down a bug caused by doing:
if (x = y)
when I meant:
if (x == y)
<snip>
The warning flag you are after is -Wparentheses. Personally, I use
-Wall, which includes this warning by default; you might be using
-Wmost, which doesn't.
In Xcode, if I set that flag for the build style, I get no warnings,
but when I set it on a particular file, I do. Is this expected
behavior? I would think you could set it for the whole project, but it
doesn't quite work.
-Prachi
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.