summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/lib/Headers/stdint.h4
-rw-r--r--clang/test/Preprocessor/stdint.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/Headers/stdint.h b/clang/lib/Headers/stdint.h
index b95ae8fb42b..a25f8f52aac 100644
--- a/clang/lib/Headers/stdint.h
+++ b/clang/lib/Headers/stdint.h
@@ -618,8 +618,8 @@ typedef __stdint_exjoin3(uint, __INTMAX_WIDTH__, _t) uintmax_t;
/* 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.
diff --git a/clang/test/Preprocessor/stdint.c b/clang/test/Preprocessor/stdint.c
index 9c98e291664..ed8e9a06249 100644
--- a/clang/test/Preprocessor/stdint.c
+++ b/clang/test/Preprocessor/stdint.c
@@ -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)
OpenPOWER on IntegriCloud