Learn more about cloning repositories
You have read-only access
Cast to unsigned int before negating the result The negation of INT_MIN causes an overflow. If we cast first, both cast and negation of unsigned quantity are well-defined and the result is what we expect.