Issue |
124032
|
Summary |
[libc] pthread_setspecific has wrong fn signature in generated header
|
Labels |
good first issue,
libc
|
Assignees |
|
Reporter |
nickdesaulniers
|
impl looks correct, generated header looks incorrect:
```c
void * pthread_setspecific(pthread_key_t, const void *) __NOEXCEPT;
```
fix libc/include/pthread.yaml for `pthread_setspecific` should return `int`, not `void*`.
Otherwise the following error is observed when building libcxxabi against llvm-libc:
```
/llvm-project-main/build/include/c++/v1/__thread/support/pthread.h:216:10: error: cannot initialize return object of type 'int' with an rvalue of type 'void *'
216 | return pthread_setspecific(__key, __p);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs