[libc-commits] [libc] [libc] add stdlib.h header to the _Exit func proxy in full build (PR #114718)

Nick Desaulniers via libc-commits libc-commits at lists.llvm.org
Mon Nov 4 14:48:09 PST 2024


nickdesaulniers wrote:

```c
extern void _Exit (int __status) __THROW __attribute__ ((__noreturn__));
```
is what my glibc host's headers have. `__THROW` which expands to:
```c
#  define __THROW       __attribute__ ((__nothrow__ __LEAF))
```
so glibc's `_Exit` is nothrow.

---
regardless, the warning is about `noreturn`, not `nothrow`.  The question isn't about throw/nothrow, it's that our declaration was missing `noreturn`.  If we redeclare a function, it needs to keep `noreturn` once declared with that fn attr.

https://github.com/llvm/llvm-project/pull/114718


More information about the libc-commits mailing list