If you want to be portable, you can use limits.h and then check for a variable that matches U<TYPE>_MAX == 1 << 31.