This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]