Skip to content
Commit 2098d403 authored by Joseph Myers's avatar Joseph Myers
Browse files

Disable spurious -Wstringop-overflow for setjmp/longjmp (bug 26647)



Building glibc with GCC 11 fails with (among other warnings) spurious
-Wstringop-overflow warnings from calls to setjmp and longjmp with a
pointer to a pthread_unwind_buf that is smaller than jmp_buf.  As
discussed in bug 26647, the warning in libc-start.c is a false
positive, because setjmp and longjmp do not access anything (the
signal mask) beyond the common prefix of the two structures, so this
patch disables the warning for that call to setjmp, as well as for two
calls in NPTL code that produce the same warning and look like false
positives for the same reason.

Tested with build-many-glibcs.py for arm-linux-gnueabi, where this
allows the build to get further.

Reviewed-by: default avatarDJ Delorie <dj@redhat.com>
parent 961d12d9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment