[Bug c/20550] New: Silencing the warning: comparison is always true due to limited range of data type
qrczak at knm dot org dot pl
gcc-bugzilla@gcc.gnu.org
Sat Mar 19 10:51:00 GMT 2005
It would be nice if the warning "comparison is always true due to limited range
of data type" could be turned off. From looking at the gcc source I conclude it
can't. I couldn't find a workaround which generates the same code (casting the
smaller type to the wider type just for the comparison doesn't silence the
warning, using a wider type for the variable generates worse code).
Yet better if it could be turned off locally. I know which comparisons in my C
macro may trigger it, and it would make sense to turn it off only in these places.
--
Summary: Silencing the warning: comparison is always true due to
limited range of data type
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: qrczak at knm dot org dot pl
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20550
More information about the Gcc-bugs
mailing list