diff --git a/libunwind/src/Registers.hpp b/libunwind/src/Registers.hpp index 92b0b8b9bb9a..59c6dc6d39a1 100644 --- a/libunwind/src/Registers.hpp +++ b/libunwind/src/Registers.hpp @@ -3652,8 +3652,10 @@ class _LIBUNWIND_HIDDEN Registers_mips_cheri { __uintcap_t __c[33]; }; mips_cheri_thread_state_t _registers; +#if defined(_LIBUNWIND_IS_NATIVE_ONLY) static_assert(__builtin_offsetof(mips_cheri_thread_state_t, __c) == _LIBUNWIND_CAPREG_START * sizeof(uint64_t), "Wrong offset for capregs"); +#endif }; inline Registers_mips_cheri::Registers_mips_cheri(const void *registers) {