[PATCH] debug: mark __libc_message_wrapper as always inline

Yury Khrustalev yury.khrustalev@arm.com
Wed Oct 29 16:20:17 GMT 2025


When building with -Og to enable debugging, there is currently a compiler error
because if __libc_message_wrapper() is not inlined, the __va_arg_pack_len macro
cannot be used.

---
Base commit: 013f5167b9
Passes regression on AArch64. OK for trunk?

See also: https://inbox.sourceware.org/libc-alpha/aNZugRbg4s4V3qlm@arm.com/

---
 include/stdio.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/stdio.h b/include/stdio.h
index 181a746949..168bcaae18 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -185,8 +185,9 @@ _Noreturn void __libc_message_impl (const char *__vmaname, const char *__fmt,
 #define __libc_assert_vma_name "glibc: assert"
 
 #ifdef __va_arg_pack
-static inline _Noreturn void __libc_message_wrapper (const char *vmaname,
-						     const char *fmt, ...)
+static inline __attribute__ ((__always_inline__))
+_Noreturn void __libc_message_wrapper (const char *vmaname,
+				       const char *fmt, ...)
 {
   if (__va_arg_pack_len () > LIBC_MESSAGE_MAX_ARGS)
     {
-- 
2.47.3



More information about the Libc-alpha mailing list