This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/25733] New: missed diagnostic about assignment used as truth value.
- From: "pluto at agmk dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Jan 2006 09:00:11 -0000
- Subject: [Bug c/25733] New: missed diagnostic about assignment used as truth value.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
int foo(int a, int b)
{
return ((a = b) ? 1 : 0); // <= missed warning.
}
int bar(int a, int b)
{
if (a = b) // warning present.
return 1;
else
return 0;
}
--
Summary: missed diagnostic about assignment used as truth value.
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pluto at agmk dot net
GCC build triplet: i686-pld-linux
GCC host triplet: i686-pld-linux
GCC target triplet: i686-pld-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25733