[llvm-bugs] [Bug 32833] New: WCHAR_MAX and WCHAR_MIN may sometimes have the wrong types
llvm-bugs at lists.llvm.org
Thu Apr 27 16:17:01 PDT 2017
Bug ID: 32833
Summary: WCHAR_MAX and WCHAR_MIN may sometimes have the wrong
Assignee: unassignedclangbugs at nondot.org
Reporter: dexonsmith at apple.com
CC: llvm-bugs at lists.llvm.org
I fix the definitions of size_t, ptrdiff_t, uintptr_t, intptr_t, uintmax_t, and
intmax_t, and the associated MAX and MIN macros, in r301593. However, I didn't
look at wchar_t, WCHAR_MAX, and WCHAR_MIN.
- Set wchar_t to __WCHAR_TYPE__.
- Set WCHAR_MAX to __WCHAR_MAX__.
- Set WCHAR_MIN to -__WCHAR_MAX__-1 when wchar_t is signed.
- Set WCHAR_MIN to 0*__WCHAR_MAX when wchar_t is unsigned.
I'm not sure how to manage the last two; filing a PR to track this.
Note that the rank of wchar_t is likely <= int on all the platforms we support,
so any problem may be unobservable right now.
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-bugs