[cfe-commits] r89226 - in /cfe/trunk: lib/Headers/stdint.h test/Preprocessor/stdint.c

Ken Dyck ken.dyck at onsemi.com
Wed Nov 18 11:42:57 PST 2009


Author: kjdyck
Date: Wed Nov 18 13:42:57 2009
New Revision: 89226

URL: http://llvm.org/viewvc/llvm-project?rev=89226&view=rev
Log:
Define INTMAX_C and UINTMAX_C in terms of the corresponding exact-width
INTn_C and UINTn_C macros.


Modified:
    cfe/trunk/lib/Headers/stdint.h
    cfe/trunk/test/Preprocessor/stdint.c

Modified: cfe/trunk/lib/Headers/stdint.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/stdint.h?rev=89226&r1=89225&r2=89226&view=diff

==============================================================================
--- cfe/trunk/lib/Headers/stdint.h (original)
+++ cfe/trunk/lib/Headers/stdint.h Wed Nov 18 13:42:57 2009
@@ -655,8 +655,8 @@
 #endif
 
 /* 7.18.4.2 Macros for greatest-width integer constants. */
-#define INTMAX_C(v)  v##LL
-#define UINTMAX_C(v) v##ULL
+#define INTMAX_C(v)  __stdint_exjoin3( INT, __INTMAX_WIDTH__, _C(v))
+#define UINTMAX_C(v) __stdint_exjoin3(UINT, __INTMAX_WIDTH__, _C(v))
 
 #endif /* __STDC_HOSTED__ */
 #endif /* __CLANG_STDINT_H */

Modified: cfe/trunk/test/Preprocessor/stdint.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/stdint.c?rev=89226&r1=89225&r2=89226&view=diff

==============================================================================
--- cfe/trunk/test/Preprocessor/stdint.c (original)
+++ cfe/trunk/test/Preprocessor/stdint.c Wed Nov 18 13:42:57 2009
@@ -418,8 +418,8 @@
 // MSP430:INT64_C_(0) INT64_C(0)
 // MSP430:UINT64_C_(0) UINT64_C(0)
 //
-// MSP430:INTMAX_C_(0) 0LL
-// MSP430:UINTMAX_C_(0) 0ULL
+// MSP430:INTMAX_C_(0) 0L
+// MSP430:UINTMAX_C_(0) 0UL
 //
 // RUN: clang-cc -E -ffreestanding -triple=pic16-none-none %s | FileCheck -check-prefix PIC16 %s
 // 
@@ -518,8 +518,8 @@
 // PIC16:INT64_C_(0) INT64_C(0)
 // PIC16:UINT64_C_(0) UINT64_C(0)
 //
-// PIC16:INTMAX_C_(0) 0LL
-// PIC16:UINTMAX_C_(0) 0ULL
+// PIC16:INTMAX_C_(0) 0L
+// PIC16:UINTMAX_C_(0) 0UL
 //
 // RUN: clang-cc -E -ffreestanding -triple=powerpc64-none-none %s | FileCheck -check-prefix PPC64 %s
 //
@@ -625,8 +625,8 @@
 // PPC64:INT64_C_(0) 0L
 // PPC64:UINT64_C_(0) 0UL
 //
-// PPC64:INTMAX_C_(0) 0LL
-// PPC64:UINTMAX_C_(0) 0ULL
+// PPC64:INTMAX_C_(0) 0L
+// PPC64:UINTMAX_C_(0) 0UL
 //
 // RUN: clang-cc -E -ffreestanding -triple=powerpc-none-none %s | FileCheck -check-prefix PPC %s
 //
@@ -840,8 +840,8 @@
 // S390X:INT64_C_(0) 0L
 // S390X:UINT64_C_(0) 0UL
 //
-// S390X:INTMAX_C_(0) 0LL
-// S390X:UINTMAX_C_(0) 0ULL
+// S390X:INTMAX_C_(0) 0L
+// S390X:UINTMAX_C_(0) 0UL
 //
 // RUN: clang-cc -E -ffreestanding -triple=sparc-none-none %s | FileCheck -check-prefix SPARC %s
 //
@@ -1047,8 +1047,8 @@
 // TCE:INT64_C_(0) INT64_C(0)
 // TCE:UINT64_C_(0) UINT64_C(0)
 //
-// TCE:INTMAX_C_(0) 0LL
-// TCE:UINTMAX_C_(0) 0ULL
+// TCE:INTMAX_C_(0) 0
+// TCE:UINTMAX_C_(0) 0U
 //
 // RUN: clang-cc -E -ffreestanding -triple=x86_64-none-none %s | FileCheck -check-prefix X86_64 %s
 //
@@ -1155,8 +1155,8 @@
 // X86_64:INT64_C_(0) 0L
 // X86_64:UINT64_C_(0) 0UL
 //
-// X86_64:INTMAX_C_(0) 0LL
-// X86_64:UINTMAX_C_(0) 0ULL
+// X86_64:INTMAX_C_(0) 0L
+// X86_64:UINTMAX_C_(0) 0UL
 //
 
 #include <stdint.h>





More information about the cfe-commits mailing list