I know unsigned int can\'t hold negative values. But the following code compiles without any errors/warnings.
unsigned int a = -10;
I am using g++ 4.9.2 and need to use -Wsign-conversion to make this warning appear.
gcc.gnu.org: Warnings about conversions between signed and unsigned integers are disabled by default in C++ unless -Wsign-conversion is explicitly enabled.