[cfe-commits] [patch] Add -Wdangling-else-parentheses
Richard Smith
richard at metafoo.co.uk
Wed Dec 21 21:31:55 PST 2011
On Thu, December 22, 2011 04:44, Rafael Ávila de Espíndola wrote:
> On 20/12/11 06:58 PM, Nico Weber wrote:
>> New version!
>>
>> This warns on the example Eli gave (like gcc does), and uses
>> -Wdangling-else as suggested by nbjoerg on IRC (part of -Wall)
>>
>>
>> espindola tells me that this warning fires 0 times with a Firefox build. It
>> now has 1 false positive in chrome on code that looks like
>>
>> if (...) for (...) if (...) { } else {
>> }
>>
>>
>> but I can live with that.
>
> LGTM.
>
> I think I agree with Richand that this is a valid warning and the idea
> of partially suppressing it in macros.
>
> Richard, is it OK if the patch goes in as is and is then refined?
Absolutely, please go ahead.
More information about the cfe-commits
mailing list