From e02e5e2b055dbb3c18229b5cf6b831270c51dd4c Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Thu, 8 Sep 2011 23:25:25 +0000 Subject: [PATCH] Remove WCHAR_MIN and WCHAR_MAX from limits.h. According to posix and c99 these should be in stdint.h - and they already are. Fixes rdar://10097036. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139332 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Headers/limits.h | 14 -------------- test/Headers/wchar_limits.cpp | 2 +- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/lib/Headers/limits.h b/lib/Headers/limits.h index 6683a2db72..ecd09a4a24 100644 --- a/lib/Headers/limits.h +++ b/lib/Headers/limits.h @@ -52,8 +52,6 @@ #undef LONG_MIN #undef LONG_MAX #undef ULONG_MAX -#undef WCHAR_MIN -#undef WCHAR_MAX #undef CHAR_BIT #undef CHAR_MIN @@ -64,7 +62,6 @@ #define SHRT_MAX __SHRT_MAX__ #define INT_MAX __INT_MAX__ #define LONG_MAX __LONG_MAX__ -#define WCHAR_MAX __WCHAR_MAX__ #define SCHAR_MIN (-__SCHAR_MAX__-1) #define SHRT_MIN (-__SHRT_MAX__ -1) @@ -90,17 +87,6 @@ #define CHAR_MAX __SCHAR_MAX__ #endif -/* C++ or C99: Added wchar_t */ -#if defined(__cplusplus) || __STDC_VERSION__ >= 199901 - -#ifdef __WCHAR_UNSIGNED__ -#define WCHAR_MIN 0 -#else -#define WCHAR_MIN (-__WCHAR_MAX__-1) -#endif - -#endif - /* C99 5.2.4.2.1: Added long long. */ #if __STDC_VERSION__ >= 199901 diff --git a/test/Headers/wchar_limits.cpp b/test/Headers/wchar_limits.cpp index f4b3541dbd..5245f31d4c 100644 --- a/test/Headers/wchar_limits.cpp +++ b/test/Headers/wchar_limits.cpp @@ -1,7 +1,7 @@ // RUN: %clang_cc1 -ffreestanding -fsyntax-only -verify %s // RUN: %clang_cc1 -ffreestanding -fsyntax-only -verify -fshort-wchar %s -#include +#include const bool swchar = (wchar_t)-1 > (wchar_t)0; -- 2.40.0