Disable spurious -Wstringop-overflow for setjmp/longjmp (bug 26647)
Joseph Myers
joseph@codesourcery.com
Fri Oct 30 21:42:47 GMT 2020
On Fri, 30 Oct 2020, Florian Weimer via Libc-alpha wrote:
> Why can't we do this instead, given that's an internal function?
>
> - extern int __sigsetjmp (struct __jmp_buf_tag __env[1],
> + extern int __sigsetjmp (struct __jmp_buf_tag __env *,
>
> Or doesn't this remove the warning?
It's not really an internal function, the installed setjmp.h does:
# define sigsetjmp(env, savemask) __sigsetjmp (env, savemask)
And the declarations in setjmp.h and pthread.h need to be consistent in
use of array or pointer to avoid the warnings about inconsistency there.
So declaring as a pointer would lose the checks that make sense for user
code.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list