Re: Warning flag for 'if (x = y)'
Re: Warning flag for 'if (x = y)'
- Subject: Re: Warning flag for 'if (x = y)'
- From: Jim Correia <email@hidden>
- Date: Fri, 16 Jan 2004 13:58:43 -0500
On Jan 16, 2004, at 1:00 PM, 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)
I then spent another ten minutes looking through the gcc warning
options and couldn't find anything that would spot this. I am sure
such a warning exists, but where?
-Wparentheses
<file:///Developer/Documentation/DeveloperTools/gcc-3.3/gcc/Warning-
Options.html>
That should do it. There is a GUI for the switch in Xcode called
"Missing Braces and Parentheses".
Jim
_______________________________________________
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.