This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/12150] New: warning in dead code (comparison is always false) [regression]
- From: "mattias at virtutech dot se" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Sep 2003 08:41:38 -0000
- Subject: [Bug c/12150] New: warning in dead code (comparison is always false) [regression]
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12150
Summary: warning in dead code (comparison is always false)
[regression]
Product: gcc
Version: 3.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mattias at virtutech dot se
CC: gcc-bugs at gcc dot gnu dot org,gustav at virtutech dot
se
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
unsigned f(unsigned x)
{
if (sizeof x > 4)
return x >= 1ull << 32 ? 1 : 0;
return 0;
}
gives the warning
foo.c:4: warning: comparison is always false due to limited range of data type
when compiled with -Wall.
This is a regression from 3.2.2.
(see also bug 4210)