]> granicus.if.org Git - clang/commitdiff
make sure that UINTMAX_MAX has an unsigned type. This assumes that
authorChris Lattner <sabre@nondot.org>
Sat, 7 Feb 2009 06:38:06 +0000 (06:38 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 7 Feb 2009 06:38:06 +0000 (06:38 +0000)
uintmax_t is unsigned long long, which is not optimal, but is assumed
elsewhere already.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64007 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Headers/stdint.h

index 7c97e98ebd1d8ff43eee614b0f3a6fe1c2dc3d01..f49defe18586a661663aabf667d07225ba2b9e48 100644 (file)
@@ -184,7 +184,7 @@ typedef __UINTMAX_TYPE__ uintmax_t;
 /* C99 7.18.2.5 Limits of greatest-width integer types. */
 #define INTMAX_MIN  (-__INTMAX_MAX__-1)
 #define INTMAX_MAX   __INTMAX_MAX__
-#define UINTMAX_MAX (__INTMAX_MAX__*2+1)
+#define UINTMAX_MAX (__INTMAX_MAX__*2ULL+1ULL)
 
 /* C99 7.18.3 Limits of other integer types. */
 #define SIG_ATOMIC_MIN INT32_MIN