This is the mail archive of the gcc-bugs@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]

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


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


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