#include <unistd.h>
#include <ldsodefs.h>
#include <exit-thread.h>
+#include <libc-diag.h>
#include <libc-internal.h>
#include <elf/libc-early-init.h>
#include <stdbool.h>
struct pthread_unwind_buf unwind_buf;
int not_first_call;
+ DIAG_PUSH_NEEDS_COMMENT;
+#if __GNUC_PREREQ (7, 0)
+ /* This call results in a -Wstringop-overflow warning because struct
+ pthread_unwind_buf is smaller than jmp_buf. setjmp and longjmp
+ do not use anything beyond the common prefix (they never access
+ the saved signal mask), so that is a false positive. */
+ DIAG_IGNORE_NEEDS_COMMENT (11, "-Wstringop-overflow=");
+#endif
not_first_call = setjmp ((struct __jmp_buf_tag *) unwind_buf.cancel_jmp_buf);
+ DIAG_POP_NEEDS_COMMENT;
if (__glibc_likely (! not_first_call))
{
struct pthread *self = THREAD_SELF;
#include <hp-timing.h>
#include <ldsodefs.h>
#include <atomic.h>
+#include <libc-diag.h>
#include <libc-internal.h>
#include <resolv.h>
#include <kernel-features.h>
struct pthread_unwind_buf unwind_buf;
int not_first_call;
+ DIAG_PUSH_NEEDS_COMMENT;
+#if __GNUC_PREREQ (7, 0)
+ /* This call results in a -Wstringop-overflow warning because struct
+ pthread_unwind_buf is smaller than jmp_buf. setjmp and longjmp
+ do not use anything beyond the common prefix (they never access
+ the saved signal mask), so that is a false positive. */
+ DIAG_IGNORE_NEEDS_COMMENT (11, "-Wstringop-overflow=");
+#endif
not_first_call = setjmp ((struct __jmp_buf_tag *) unwind_buf.cancel_jmp_buf);
+ DIAG_POP_NEEDS_COMMENT;
/* No previous handlers. NB: This must be done after setjmp since the
private space in the unwind jump buffer may overlap space used by
#include <string.h>
#include <unistd.h>
#include "pthreadP.h"
+#include <libc-diag.h>
#include <jmpbuf-unwind.h>
#ifdef _STACK_GROWS_DOWN
}
}
+ DIAG_PUSH_NEEDS_COMMENT;
+#if __GNUC_PREREQ (7, 0)
+ /* This call results in a -Wstringop-overflow warning because struct
+ pthread_unwind_buf is smaller than jmp_buf. setjmp and longjmp
+ do not use anything beyond the common prefix (they never access
+ the saved signal mask), so that is a false positive. */
+ DIAG_IGNORE_NEEDS_COMMENT (11, "-Wstringop-overflow=");
+#endif
if (do_longjump)
__libc_unwind_longjmp ((struct __jmp_buf_tag *) buf->cancel_jmp_buf, 1);
+ DIAG_POP_NEEDS_COMMENT;
return _URC_NO_REASON;
}