GCC's predefined macro includes __INT8_MAX__
but not __INT8_MIN__
.
INT8_MIN
is defined in stdint.h
with (-__INT8_MAX - 1)
.
Does GCC assume that the system is in two's complement? I think (INT8_MAX +1)
is a better way to define INT8_MIN
since it'll work in both 1's complement system and 2's comlement system, and the best is compiler-provided __INT8_MIN__
.
Why doesn't gcc provide __INT8_MIN__
?
I don't actually have any system not using two's complement so I don't get any trouble using it but I'm just curious.