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: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: qrczak at knm dot org dot pl (Marcin 'Qrczak' Kowalczyk)
- Cc: gcc at gcc dot gnu dot org
- Date: Sat, 21 Jan 2006 15:16:33 -0500 (EST)
- Subject: Re: warning: comparison is always true due to limited range of data type
>
> Hello.
>
> There was a discussion about this warning about a year ago, but it
> seems to have been forgotten without a resolution.
>
> This warning is issued unconditionally, impossible to disable, hard
> to work around, and it depends on integer sizes even when the code
> is portable.
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.
See PR 25886.
Thanks,
Andrew Pinski