]> sourceware.org Git - glibc.git/commit
Fix GCC 11 -Warray-parameter warning for __sigsetjmp (bug 26647)
authorJoseph Myers <joseph@codesourcery.com>
Mon, 5 Oct 2020 16:46:46 +0000 (16:46 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Mon, 5 Oct 2020 16:46:46 +0000 (16:46 +0000)
commit19302b27bdacfe87e861ff46fc0fbad60dd6602d
tree9e97cb87089d1bd597ab6ba4fbea20bc556cd229
parent5bb2e5300b9b7cf1b8b7f2cbcbfca4d4a529082d
Fix GCC 11 -Warray-parameter warning for __sigsetjmp (bug 26647)

This patch fixes part of bug 26647 (-Werror=array-parameter error
building with GCC 11 because of __sigsetjmp being declared using an
array parameter in one header and a pointer parameter in another).

The fix is to split the struct __jmp_buf_tag definition out to a
separate bits/types/ header so it can be included in pthread.h, so
that pthread.h can declare __sigsetjmp with the type contents visible,
so can use an array (as in setjmp.h) rather than a pointer in the
declaration.

Note that several other build failures with GCC 11 remain.  This does
not fix the jmp_buf-related -Wstringop-overflow errors (also discussed
in bug 26647), or -Warray-parameter errors for other functions (bug
26686), or -Warray-bounds errors (bug 26687).

Tested, with older compilers, natively for x86_64 and with
build-many-glibc.py for aarch64-linux-gnu.  Tested with
build-many-glibcs.py with GCC mainline for aarch64-linux-gnu that this
gets past the -Warray-parameter issue for __sigsetjmp (with the next
build failure being the other one discussed in bug 26647).
include/bits/types/struct___jmp_buf_tag.h [new file with mode: 0644]
setjmp/Makefile
setjmp/bits/types/struct___jmp_buf_tag.h [new file with mode: 0644]
setjmp/setjmp.h
sysdeps/nptl/pthread.h
This page took 0.045693 seconds and 5 git commands to generate.