]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb: Ignore some stringop-overflow and restrict warnings on sparc users/ahajkova/try-frob
authorMark Wielaard <mark@klomp.org>
Sun, 15 Jan 2023 00:51:53 +0000 (01:51 +0100)
committerAlexandra Hájková <ahajkova@redhat.com>
Mon, 23 Jan 2023 15:39:26 +0000 (16:39 +0100)
commit1a39c1a4a21107fe47b9c45cc3e5da35a3a37c1f
tree6cc537fac438d32049133908c994b17ec0dcfb84
parenteb015bf86b6c6764f8acfea01a25a63e9b492dc5
gdb: Ignore some stringop-overflow and restrict warnings on sparc

For some reason g++ 11.2.1 on s390x produces a spurious warning for
stringop-overread and restruct in fsb-tdep.c for some memcpy calls.
Add new DIAGNOSTIC_IGNORE_STRINGOP_OVERFLOW and
DIAGNOSTIC_IGNORE_RESTRICT macro to suppress these warning.

include/ChangeLog:

* diagnostics.h (DIAGNOSTIC_IGNORE_STRINGOP_OVERFLOW): New
macro.
(DIAGNOSTIC_IGNORE_RESTRICT): Likewise.

gdb/ChangeLog:

* fsb-tdep.c (fbsd_make_note_desc): Use
DIAGNOSTIC_IGNORE_STRINGOP_OVERFLOW and
DIAGNOSTIC_IGNORE_RESTRICT on sparc.
gdb/fbsd-tdep.c
include/diagnostics.h