warning: comparison is always true due to limited range of data type

Marcin 'Qrczak' Kowalczyk qrczak@knm.org.pl
Sat Jan 21 20:47:00 GMT 2006


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/



More information about the Gcc mailing list