In the book \"Complete Reference of C\" it is mentioned that char is by default unsigned.
char
But I am trying to verify this with GCC as well as Visual Stud
Now, we known the standard leaves that up to the implementation.
But how to check a type is signed or unsigned, such as char?
signed
unsigned
I wrote a macro to do this:
#define IS_UNSIGNED(t) ((t)~1 > 0)
and test it with gcc, clang, and cl. But I do not sure it's always safe for other cases.
gcc
clang
cl