[libc-commits] [libc] [libc][arm] implement setjmp/longjmp (PR #93220)
Roland McGrath via libc-commits
libc-commits at lists.llvm.org
Thu May 23 10:50:34 PDT 2024
================
@@ -32,6 +32,9 @@ typedef struct {
#elif defined(__riscv_float_abi_single)
#error "__jmp_buf not available for your target architecture."
#endif
+#elif defined(__arm__)
+ // r4, r5, r6, r7, r8, r9, r10, r11, r12, lr
+ long opaque [10];
----------------
frobtech wrote:
Extra space before `[` here.
This is already a problem for the x86-64 case, but it's not kosher to use plain identifiers here, or in any standard C header. They need to be `__`-prefixed in case a user has `#define opaque syntax-error` before `#include <setjmp.h>`. We should look into a clang-tidy check to enforce that.
https://github.com/llvm/llvm-project/pull/93220
More information about the libc-commits
mailing list