Use DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION to silence GCC 8.1
GCC 8.1 warns about destination size with -Wstringop-truncation: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85643 Use DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION to silence it. bfd/ PR binutils/23146 * bfd-in.h: Include "diagnostics.h". * bfd-in2.h: Regenerated. * elf32-arm.c (elf32_arm_nabi_write_core_note): Use DIAGNOSTIC_PUSH, DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION and DIAGNOSTIC_POP to silence GCC 8.1 warnings with -Wstringop-truncation. * elf32-ppc.c (ppc_elf_write_core_note): Likewse. * elf32-s390.c (elf_s390_write_core_note): Likewse. * elf64-ppc.c (ppc64_elf_write_core_note): Likewse. * elf64-s390.c (elf_s390_write_core_note): Likewse. * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewse. include/ * diagnostics.h (DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION): Always define for GCC.
This commit is contained in:
parent
62b74cb8b0
commit
95da985446
11 changed files with 77 additions and 3 deletions
|
@ -48,10 +48,8 @@
|
|||
# define DIAGNOSTIC_IGNORE_UNUSED_FUNCTION \
|
||||
DIAGNOSTIC_IGNORE ("-Wunused-function")
|
||||
|
||||
# if __GNUC__ == 8 && __GNUC_MINOR__ < 2
|
||||
# define DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION \
|
||||
# define DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION \
|
||||
DIAGNOSTIC_IGNORE ("-Wstringop-truncation")
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef DIAGNOSTIC_IGNORE_SELF_MOVE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue