[Bug c++/52961] New: Missing warning on empty if
xinliangli at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Apr 12 22:08:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52961
Bug #: 52961
Summary: Missing warning on empty if
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: xinliangli@gmail.com
int test(int i) {
if (i > 42);
return 42;
return i;
}
/*
emptyif.cpp:2:14: warning: if statement has empty body [-Wempty-body]
if (i > 42);
^
1 warning generated.
*/
More information about the Gcc-bugs
mailing list