[DISABLE, INFORMATION, WARNING , ERROR]
The unary minus operator was applied to an unsigned type.
void main(void) {
unsigned char c;
unsigned char d= -c;
}
An unsigned type never can become a negative value. So using the unary minus operator may cause an unwanted behavior! Note that ANSI C treats -1 as negated value of 1. Therefore 2147483648 is an unsigned int, if int is 32 bits large or an unsigned long if not. The negation is a unary function as any other, so the result type is the argument type propagated to int, if smaller. Note that the value -2147483648 is the negation of 2147483648 and therefore also of a unsigned type, even if the signed representation contains this value.