From: Chris Lattner Date: Sat, 7 Feb 2009 06:38:06 +0000 (+0000) Subject: make sure that UINTMAX_MAX has an unsigned type. This assumes that X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c865f7ae8be99de29c9f2ab68573c11e90b636d1;p=clang make sure that UINTMAX_MAX has an unsigned type. This assumes that 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 --- diff --git a/lib/Headers/stdint.h b/lib/Headers/stdint.h index 7c97e98ebd..f49defe185 100644 --- a/lib/Headers/stdint.h +++ b/lib/Headers/stdint.h @@ -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