[libcxx-commits] [libcxx] [libcxx][libc] update LLVM-libc test status (PR #201236)
Alexey Samsonov via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jun 25 13:06:39 PDT 2026
vonosmas wrote:
Argh, looks like libc++ 's wchar.h wrapper ([libcxx/include/wchar.h](https://github.com/llvm/llvm-project/blob/main/libcxx/include/wchar.h)) is really strict on compliance.
```
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/generic-llvm-libc/include/c++/v1/wchar.h:142:20: error: cast from 'const wchar_t *' to 'wchar_t *' drops const qualifier [-Werror,-Wcast-qual]
142 | return (wchar_t*)wcschr(__s, __c);
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/generic-llvm-libc/include/c++/v1/wchar.h:152:20: error: cast from 'const wchar_t *' to 'wchar_t *' drops const qualifier [-Werror,-Wcast-qual]
152 | return (wchar_t*)wcspbrk(__s1, __s2);
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/generic-llvm-libc/include/c++/v1/wchar.h:163:20: error: cast from 'const wchar_t *' to 'wchar_t *' drops const qualifier [-Werror,-Wcast-qual]
163 | return (wchar_t*)wcsrchr(__s, __c);
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/generic-llvm-libc/include/c++/v1/wchar.h:173:20: error: cast from 'const wchar_t *' to 'wchar_t *' drops const qualifier [-Werror,-Wcast-qual]
173 | return (wchar_t*)wcsstr(__s1, __s2);
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/generic-llvm-libc/include/c++/v1/wchar.h:184:20: error: cast from 'const wchar_t *' to 'wchar_t *' drops const qualifier [-Werror,-Wcast-qual]
184 | return (wchar_t*)wmemchr(__s, __c, __n);
| ^
```
means that we should update the return types of these five functions in our generated `wchar.h` header to return `wchar_t *` (as dictated by C/POSIX standards) instead of `const wchar_t *` we have currently.
https://github.com/llvm/llvm-project/pull/201236
More information about the libcxx-commits
mailing list