[cfe-commits] [patch] Add -Wdangling-else-parentheses

Rafael Ávila de Espíndola rafael.espindola at gmail.com
Wed Dec 21 20:44:53 PST 2011


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?

> Nico

Cheers,
Rafael




More information about the cfe-commits mailing list