https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70922

--- Comment #2 from Pedro Alves <palves at redhat dot com> ---
I noticed that this triggers with C++, but not with C.  (GDB recently switched
to building as C++ program by default.)

With g++ 20160407 (what I have handy):

 $ /opt/gcc/bin/g++ parens.c -o parens -Wall -Wparentheses
 parens.c: In function ‘int main()’:
 parens.c:24:6: warning: suggest explicit braces to avoid ambiguous ‘else’
[-Wparentheses]
    if (condition)

       ^

But with gcc (still 20160407):

 $ /opt/gcc/bin/gcc parens.c -o parens -Wall -Wparentheses
 $ 

Fedora 23's g++ 5.3.1 20160406 (Red Hat 5.3.1-6) does not warn:

 $ g++ parens.c -o parens -Wall -Wparentheses
 $

Reply via email to