This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/25733] missed diagnostic about assignment used as truth value.
- From: "ianw at vmware dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Apr 2008 22:14:37 -0000
- Subject: [Bug c/25733] missed diagnostic about assignment used as truth value.
- References: <bug-25733-7667@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from ianw at vmware dot com 2008-04-28 22:14 -------
As another data-point,
if ( (a=10) ) ;
also doesn't warn. I'm not sure what the standard says on that, but other
contemporary compilers do give the an "assignment used as truth value" warning
for the example above.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25733