This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Bogus warning?
- To: gcc-bugs at gcc dot gnu dot org
- Subject: Bogus warning?
- From: Brad Lucier <lucier at math dot purdue dot edu>
- Date: Tue, 20 Jun 2000 11:58:36 -0500 (EST)
- Cc: lucier at math dot purdue dot edu, feeley at iro dot umontreal dot ca
On this file:
#include <stdio.h>
void
test(unsigned long x)
{
if (((unsigned long)(x)<(unsigned int)( (((long)1<<((8*(1<<3))-2-1))-1)+1)))
printf("OK.\n");
else
printf("OK, too.\n");
}
I get:
popov-2% gcc -v
Reading specs from /export/u10/egcs-test/lib/gcc-lib/alphaev6-unknown-linux-gnu/2.96/specs
gcc version 2.96 20000617 (experimental)
popov-4% gcc -W -Wall -c test1.c
test1.c: In function `test':
test1.c:6: warning: comparison of unsigned expression < 0 is always false
As far as I can tell, the right hand side is not zero on the alpha.
Brad Lucier