This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/51371] New: compilation should produce warning
- From: "gideon425.gb5 at mailnull dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 01 Dec 2011 02:57:31 +0000
- Subject: [Bug c/51371] New: compilation should produce warning
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51371
Bug #: 51371
Summary: compilation should produce warning
Classification: Unclassified
Product: gcc
Version: 4.6.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: gideon425.gb5@mailnull.com
unsigned long l;
unsigned long l2;
void x()
{
if (l >= 0) l2 = 1;
}
compiling the above code with -Wlogical-op should give a warning
as l can never be negative