[cfe-commits] r89350 - in /cfe/trunk: lib/Headers/stdint.h test/Preprocessor/stdint.c
Ken Dyck
ken.dyck at onsemi.com
Thu Nov 19 06:35:19 PST 2009
Author: kjdyck
Date: Thu Nov 19 08:35:19 2009
New Revision: 89350
URL: http://llvm.org/viewvc/llvm-project?rev=89350&view=rev
Log:
Parameterize WINT_MIN and WINT_MAX with __WINT_WIDTH__ to support arbitrary
widths. This corrects the values of these definitions for MSP430 and PIC16.
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=89350&r1=89349&r2=89350&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/stdint.h (original)
+++ cfe/trunk/lib/Headers/stdint.h Thu Nov 19 08:35:19 2009
@@ -618,8 +618,8 @@
/* C99 7.18.3 Limits of other integer types. */
#define SIG_ATOMIC_MIN INT32_MIN
#define SIG_ATOMIC_MAX INT32_MAX
-#define WINT_MIN INT32_MIN
-#define WINT_MAX INT32_MAX
+#define WINT_MIN __stdint_exjoin3(INT, __WINT_WIDTH__, _MIN)
+#define WINT_MAX __stdint_exjoin3(INT, __WINT_WIDTH__, _MAX)
/* FIXME: if we ever support a target with unsigned wchar_t, this should be
* 0 .. Max.
Modified: cfe/trunk/test/Preprocessor/stdint.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/stdint.c?rev=89350&r1=89349&r2=89350&view=diff
==============================================================================
--- cfe/trunk/test/Preprocessor/stdint.c (original)
+++ cfe/trunk/test/Preprocessor/stdint.c Thu Nov 19 08:35:19 2009
@@ -403,8 +403,8 @@
//
// MSP430:SIG_ATOMIC_MIN_ (-2147483647L -1)
// MSP430:SIG_ATOMIC_MAX_ 2147483647L
-// MSP430:WINT_MIN_ (-2147483647L -1)
-// MSP430:WINT_MAX_ 2147483647L
+// MSP430:WINT_MIN_ (-32767 -1)
+// MSP430:WINT_MAX_ 32767
//
// MSP430:WCHAR_MAX_ 32767
// MSP430:WCHAR_MIN_ (-32767 -1)
@@ -503,8 +503,8 @@
//
// PIC16:SIG_ATOMIC_MIN_ (-2147483647L -1)
// PIC16:SIG_ATOMIC_MAX_ 2147483647L
-// PIC16:WINT_MIN_ (-2147483647L -1)
-// PIC16:WINT_MAX_ 2147483647L
+// PIC16:WINT_MIN_ (-32767 -1)
+// PIC16:WINT_MAX_ 32767
//
// PIC16:WCHAR_MAX_ 32767
// PIC16:WCHAR_MIN_ (-32767 -1)
More information about the cfe-commits
mailing list