This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: warning: comparison is always true due to limited range of data type
- From: Marcin 'Qrczak' Kowalczyk <qrczak at knm dot org dot pl>
- To: gcc at gcc dot gnu dot org
- Date: Sat, 21 Jan 2006 21:47:45 +0100
- Subject: Re: warning: comparison is always true due to limited range of data type
- References: <200601212016.k0LKGXsd011982@earth.phy.uc.edu>
Andrew Pinski <pinskia@physics.uc.edu> writes:
> Well this warning just found a bug in GCC's code where we had an enum and
> that enum was stored in a bitfield but the bitfield did not span the
> whole enum so we get this warning.
Couldn't this be detected when the enum is stored in the bitfield?
> See PR 25886.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25886 doesn't seem to be
related to this.
Gabriel Dos Reis <gdr@cs.tamu.edu> writes:
> See -Walways-true.
gcc-4.1.0-0.20051206r108118 doesn't know this option.
Is it newer or in some unofficial patch?
--
__("< Marcin Kowalczyk
\__/ qrczak@knm.org.pl
^^ http://qrnik.knm.org.pl/~qrczak/