+2016-04-11 Paul Eggert <eggert@cs.ucla.edu>
+
+ stdint: port to strict C11 left shift
+ * lib/stdint.in.h (_STDINT_MIN, _STDINT_MAX):
+ Pacify clang -Wshift-negative-value, which should be an issue only
+ on clang setups where stdint.h does not conform to C11 or to C++11.
+ Problem reported by Philipp Stephani in: http://bugs.gnu.org/23261
+
2016-04-09 Paul Eggert <eggert@penguin.cs.ucla.edu>
mbrtowc: work around glibc bug#19932
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