forked from OSchip/llvm-project
e77a3aff6f
size_t is usually defined as unsigned long, but on 64-bit platforms, stdint.h currently defines SIZE_MAX using "ull" (unsigned long long). Although this is the same width, it doesn't necessarily have the same alignment or calling convention. It also triggers printf warnings when using the format flag "%zu" to print SIZE_MAX. This changes SIZE_MAX to reuse the compiler-provided __SIZE_MAX__, and provides similar fixes for the other integers: - INTPTR_MIN - INTPTR_MAX - UINTPTR_MAX - PTRDIFF_MIN - PTRDIFF_MAX - INTMAX_MIN - INTMAX_MAX - UINTMAX_MAX - INTMAX_C() - UINTMAX_C() ... and fixes the typedefs for intptr_t and uintptr_t to use __INTPTR_TYPE__ and __UINTPTR_TYPE__ instead of int32_t, effectively reverting r89224, r89226, and r89237 (r89221 already having been effectively reverted). We can probably also kill __INTPTR_WIDTH__, __INTMAX_WIDTH__, and __UINTMAX_WIDTH__ in a follow-up, but I was hesitant to delete all the per-target CHECK lines in this commit since those might serve their own purpose. rdar://problem/11811377 llvm-svn: 301593 |
||
---|---|---|
.. | ||
Inputs | ||
altivec-header.c | ||
altivec-intrin.c | ||
arm-acle-header.c | ||
arm-neon-header.c | ||
arm64-apple-ios-types.cpp | ||
c11.c | ||
c89.c | ||
cpuid.c | ||
cxx11.cpp | ||
float-darwin.c | ||
float.c | ||
htm-header.c | ||
int64-type.c | ||
limits.cpp | ||
ms-intrin.cpp | ||
ms-null-ms-header-vs-stddef.cpp | ||
ms-wchar.c | ||
opencl-c-header.cl | ||
pmmintrin.c | ||
stdarg-gnuc_va_list.c | ||
stdatomic.c | ||
stdbool.cpp | ||
stddefneeds.cpp | ||
stdint-typeof-MINMAX.cpp | ||
tgmath-darwin.c | ||
tgmath.c | ||
thumbv7-apple-ios-types.cpp | ||
typedef_guards.c | ||
unwind.c | ||
wchar_limits.cpp | ||
wmmintrin.c | ||
x86-intrinsics-headers.c | ||
x86_64-apple-macosx-types.cpp | ||
x86intrin-2.c | ||
x86intrin.c | ||
x86intrin.cpp | ||
xmmintrin.c |