[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: warnings in ProjectCenter and GNUstep detect
From: |
Matt Rice |
Subject: |
Re: warnings in ProjectCenter and GNUstep detect |
Date: |
Thu, 7 Apr 2011 07:48:11 -0700 |
On Thu, Apr 7, 2011 at 7:42 AM, Riccardo Mottola
<riccardo.mottola@libero.it> wrote:
> Hi,
>>
>> PCMiscPrefs.m:194:15: warning: equality comparison with extraneous
>> parentheses
>> [-Wparentheses]
>> if ((sender == debuggerField))
>> ~~~~~~~^~~~~~~~~~~~~~~~
>> PCMiscPrefs.m:194:15: note: use '=' to turn this equality comparison into
>> an
>> assignment
>
> Could it be that GCC has the suggestion of the double parentheses instead ?
> I remember something about the double () being suggested by gcc but I don't
> remember when. I put it in when it complains.
gcc suggests parens in the case of assignment, e.g. if (foo = bar)
gcc should make no such suggestion for the == case.