[Bug c/25733] missed diagnostic about assignment used as truth value.
manu at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun Feb 21 01:44:00 GMT 2010
------- Comment #11 from manu at gcc dot gnu dot org 2010-02-21 01:43 -------
I am not saying that the warning is not useful. I am saying that the current
behaviour of not warning if there are parenthesis is not ideal.
So either:
if ((bool) a = 0)
or
if ( (a=0) != 0)
seem much better choices for avoiding warning.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25733
More information about the Gcc-bugs
mailing list