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

Rafael Ávila de Espíndola rafael.espindola at gmail.com
Tue Dec 20 14:31:29 PST 2011


> gcc incorrectly warn on
> 
> void f(int a, int b, int c, int d) {
>   if (a)
>     if (b) {
>       c++;
>     }
>     else d++;
> }
> 

Matt pointed out on IRC that this case *is* ambiguous and should be
included in the waring.

Cheers,
Rafael



More information about the cfe-commits mailing list