Re: Warning flag for 'if (x = y)'
Re: Warning flag for 'if (x = y)'
- Subject: Re: Warning flag for 'if (x = y)'
- From: Alastair Houghton <email@hidden>
- Date: Fri, 16 Jan 2004 19:03:52 +0000
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)
>
> 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?
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.
Kind regards,
Alastair.
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.