diff options
Diffstat (limited to 'lib/stdint.in.h')
-rw-r--r-- | lib/stdint.in.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/stdint.in.h b/lib/stdint.in.h index 0bb9ad41b29..cf65ec62e97 100644 --- a/lib/stdint.in.h +++ b/lib/stdint.in.h @@ -118,15 +118,10 @@ picky compilers. */ #define _STDINT_MIN(signed, bits, zero) \ - ((signed) ? (- ((zero) + 1) << ((bits) ? (bits) - 1 : 0)) : (zero)) + ((signed) ? ~ _STDINT_MAX (signed, bits, zero) : (zero)) #define _STDINT_MAX(signed, bits, zero) \ - ((signed) \ - ? ~ _STDINT_MIN (signed, bits, zero) \ - : /* The expression for the unsigned case. The subtraction of (signed) \ - is a nop in the unsigned case and avoids "signed integer overflow" \ - warnings in the signed case. */ \ - ((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1) + (((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1) #if !GNULIB_defined_stdint_types |