[Bug c/51371] New: compilation should produce warning
gideon425.gb5 at mailnull dot com
gcc-bugzilla@gcc.gnu.org
Thu Dec 1 02:58:00 GMT 2011
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
More information about the Gcc-bugs
mailing list