From b134c206bc07dbbb9e74b3be2db269c4f1196e40 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 11 Apr 2016 09:02:00 -0700 Subject: Sync with gnulib This is for picky compilers whose stdint.h fails our C11 tests. Problem reported for clang by Philipp Stephani (Bug#23261). This incorporates: 2016-04-11 stdint: port to strict C11 left shift * doc/misc/texinfo.tex, lib/stdint.in.h: Copy from gnulib. --- lib/stdint.in.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'lib') 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 -- cgit v1.2.1