I know unsigned int can\'t hold negative values. But the following code compiles without any errors/warnings.
unsigned int a = -10;
For gcc compiler you can add
gcc -Wconversion ...
And this will produce the following warning
warning: converting negative value '-0x0000000000000000a' to 'unsigned int'