[libc-commits] [libc] [libc] fix -Wmissing-attributes in setjmp (PR #112415)
via libc-commits
libc-commits at lists.llvm.org
Tue Oct 15 12:15:31 PDT 2024
================
@@ -17,8 +17,13 @@
namespace LIBC_NAMESPACE_DECL {
-[[gnu::naked]]
-LLVM_LIBC_FUNCTION(int, setjmp, (__jmp_buf * buf)) {
+LLVM_LIBC_FUNCTION_ATTR decltype(LIBC_NAMESPACE::setjmp) __setjmp_impl__ __asm__("setjmp");
+
+decltype(LIBC_NAMESPACE::setjmp) setjmp [[gnu::alias("setjmp"), gnu::nothrow]];
+
+[[gnu::naked, gnu::nothrow]]
+int __setjmp_impl__ (__jmp_buf *buf) {
----------------
lntue wrote:
Can you use `jmpbuf` here instead of `__jmp_buf*`?
https://github.com/llvm/llvm-project/pull/112415
More information about the libc-commits
mailing list