[PATCH] debug: mark __libc_message_wrapper as always inline

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Wed Oct 29 16:35:22 GMT 2025



On 29/10/25 13:20, Yury Khrustalev wrote:
> 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__))

__always_inline maybe?  

LGTM with this change, thanks.

> +_Noreturn void __libc_message_wrapper (const char *vmaname,
> +				       const char *fmt, ...)
>  {
>    if (__va_arg_pack_len () > LIBC_MESSAGE_MAX_ARGS)
>      {



More information about the Libc-alpha mailing list