[libc-commits] [libc] [libc] fix -Wmissing-attributes in setjmp (PR #112415)

via libc-commits libc-commits at lists.llvm.org
Tue Oct 15 12:54:32 PDT 2024


================
@@ -13,9 +13,13 @@
 // public header setjmp.h which is also included. here.
 #include "hdr/types/jmp_buf.h"
 #include "src/__support/macros/config.h"
+#include "src/__support/macros/properties/compiler.h"
 
 namespace LIBC_NAMESPACE_DECL {
 
+#ifdef LIBC_COMPILER_IS_GCC
+[[gnu::nothrow]]
----------------
lntue wrote:

Nit: do you mind adding comments here about gcc implicitly add `nothrow` with `[[gnu::naked]]`?

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


More information about the libc-commits mailing list