[libcxx-commits] [libcxx] [libc++] picolibc: avoid warning in __locale (PR #73937)
Dominik Wójt via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Nov 30 06:20:36 PST 2023
================
@@ -452,16 +452,18 @@ public:
#elif defined(_NEWLIB_VERSION)
// Same type as Newlib's _ctype_ array in newlib/libc/include/ctype.h.
typedef char mask;
+ // In case char is signed, static_cast is needed to avoid warning on
+ // positive value becomming negative.
static const mask space = _S;
- static const mask print = _P | _U | _L | _N | _B;
+ static const mask print = static_cast<mask>(_P | _U | _L | _N | _B);
----------------
domin144 wrote:
Yes. I will update in a moment.
https://github.com/llvm/llvm-project/pull/73937
More information about the libcxx-commits
mailing list