Disable spurious -Wstringop-overflow for setjmp/longjmp (bug 26647)
Andreas Schwab
schwab@linux-m68k.org
Thu Oct 29 16:35:41 GMT 2020
On Okt 29 2020, Joseph Myers wrote:
> Like this (which also works to fix the testsuite build problems, given the
> three other patches posted to fix the build of glibc itself)?
>
> diff --git a/sysdeps/nptl/pthread.h b/sysdeps/nptl/pthread.h
> index d4194da..6632eae 100644
> --- a/sysdeps/nptl/pthread.h
> +++ b/sysdeps/nptl/pthread.h
> @@ -658,8 +658,9 @@ __pthread_cleanup_routine (struct __pthread_cleanup_frame *__frame)
> __pthread_unwind_buf_t __cancel_buf; \
> void (*__cancel_routine) (void *) = (routine); \
> void *__cancel_arg = (arg); \
> - int __not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *) \
> - __cancel_buf.__cancel_jmp_buf, 0); \
> + int __not_first_call \
> + = __sigsetjmp_cancel ((struct __jmp_buf_tag *) (void *) \
> + __cancel_buf.__cancel_jmp_buf, 0); \
Why not just using the type of __cancel_jmp_buf directly?
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
More information about the Libc-alpha
mailing list