fork of 9front i guess
![]() to reproduce: u8int x, y; x = 0xff; y = 0xc0; if((s8int)(x & y) >= 0) print("help\n"); compiles correctly but prints a warning warning: test.c:11 useless or misleading comparison: UINT >= 0 the issue is that compar() unconditionally skipped over all left casts ignoring the case when a cast would sign extend the value. the new code only skips over the cast when the original type with is smaller than the cast result or when they are equal width and types have same signedness. so the effective left hand side type is the last truncation or sign extension. |
||
---|---|---|
386 | ||
68000 | ||
68020 | ||
acme | ||
adm/timezone | ||
amd64 | ||
arm | ||
lib | ||
mips | ||
power | ||
power64 | ||
rc | ||
sparc | ||
sparc64 | ||
spim | ||
sys | ||
.hgignore |