Example program:
int main(void)
{
unsigned int x = 0u;
unsigned char y = 0u;
return x > y;
}
main.c(5): warning #2251: Operands of '>' have types with different signedness: 'unsigned int' and 'int'.
I report it because I consider this incorrect since both operands are clearly unsigned. MSVC, clang and gcc do not generate such erroneous warning in this situation either (but would if y was just 'int').
I'm guessing this appears because unsigned char is first promoted to int (which is signed) and then the compiler just sees (signed) int being compared with unsigned int, forgetting that this int came from an integer promotion of a smaller unsigned integer type.