gcc-2.95.2: "(unsigned char) < 256"

Ulrich Windl Ulrich.Windl@rz.uni-regensburg.de
Mon Mar 26 04:58:00 GMT 2001


Hello,

I just made a stupid mistake, finally wondering whether gcc -Wall could 
catch it:

unsigned char uc;

for ( uc = 0; uc < 256; ++uc )
	...;

Of course, the loop ran forever.

However for "(unsigned" < 0", gcc emits a warning. Can it be done for 
my case, too?

Regards,
Ulrich



More information about the Gcc-bugs mailing list