[all-commits] [llvm/llvm-project] 079ca0: [libc] fix -Wtype-limits in wctob (#74511)
Nick Desaulniers via All-commits
all-commits at lists.llvm.org
Tue Dec 5 15:37:40 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 079ca05eea35745b2c362c218069dcc1c33982b9
https://github.com/llvm/llvm-project/commit/079ca05eea35745b2c362c218069dcc1c33982b9
Author: Nick Desaulniers <nickdesaulniers at users.noreply.github.com>
Date: 2023-12-05 (Tue, 05 Dec 2023)
Changed paths:
M libc/src/__support/wctype_utils.h
Log Message:
-----------
[libc] fix -Wtype-limits in wctob (#74511)
GCC warns:
```
libc/src/__support/wctype_utils.h:33:20: error: comparison of unsigned
expression in ‘< 0’ is always false [-Werror=type-limits]
33 | if (c > 127 || c < 0)
| ~~^~~
```
Looking into the signedness of wint_t, it looks like depending on the
platform,
__WINT_TYPE__ is defined to int or unsigned int depending on the
platform.
Link:
https://lab.llvm.org/buildbot/#/builders/250/builds/14891/steps/6/logs/stdio
More information about the All-commits
mailing list