[libc-commits] [libc] [libc] fix -Wtype-limits in wctob (PR #74511)
Schrodinger ZHU Yifan via libc-commits
libc-commits at lists.llvm.org
Tue Dec 5 11:32:47 PST 2023
================
@@ -28,10 +28,14 @@ namespace internal {
LIBC_INLINE cpp::optional<int> wctob(wint_t c) {
// This needs to be translated to EOF at the callsite. This is to avoid
// including stdio.h in this file.
- // The standard states that wint_t may either be an alias of wchar_t or
- // an alias of an integer type, so we need to keep the c < 0 check.
- if (c > 127 || c < 0)
+ if (c > 127)
----------------
SchrodingerZhu wrote:
![image](https://github.com/llvm/llvm-project/assets/20108837/4f593a01-b5e3-4c7d-9d17-3059374bee4b)
https://github.com/llvm/llvm-project/pull/74511
More information about the libc-commits
mailing list