aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-s390.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf64-s390.c')
-rw-r--r--bfd/elf64-s390.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c
index 93a3c7c..ea10a89 100644
--- a/bfd/elf64-s390.c
+++ b/bfd/elf64-s390.c
@@ -3760,16 +3760,18 @@ elf_s390_write_core_note (bfd *abfd, char *buf, int *bufsiz,
va_end (ap);
strncpy (data + 40, fname, 16);
+#if GCC_VERSION == 8001
DIAGNOSTIC_PUSH;
/* GCC 8.1 warns about 80 equals destination size with
-Wstringop-truncation:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85643
*/
-#if GCC_VERSION == 8001
DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION;
#endif
strncpy (data + 56, psargs, 80);
+#if GCC_VERSION == 8001
DIAGNOSTIC_POP;
+#endif
return elfcore_write_note (abfd, buf, bufsiz, "CORE", note_type,
&data, sizeof (data));
}