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

2006-01-21 Thread Gabriel Dos Reis
Marcin 'Qrczak' Kowalczyk <[EMAIL PROTECTED]> writes: | Gabriel Dos Reis <[EMAIL PROTECTED]> writes: | | > See -Walways-true. | | gcc-4.1.0-0.20051206r108118 doesn't know this option. | Is it newer or in some unofficial patch? GCC-4.2.0. http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#i

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

2006-01-21 Thread Andrew Pinski
> > Andrew Pinski <[EMAIL PROTECTED]> 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 t

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

2006-01-21 Thread Marcin 'Qrczak' Kowalczyk
Andrew Pinski <[EMAIL PROTECTED]> 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? > S

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

2006-01-21 Thread Gabriel Dos Reis
Marcin 'Qrczak' Kowalczyk <[EMAIL PROTECTED]> writes: | 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 i

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

2006-01-21 Thread Andrew Pinski
> > 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

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

2006-01-21 Thread Marcin 'Qrczak' Kowalczyk
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. I think it should be re