]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Suppress string diagnostics for pre-release GCC
authorAlan Modra <amodra@gmail.com>
Wed, 25 Jul 2018 02:10:48 +0000 (11:40 +0930)
committerAlan Modra <amodra@gmail.com>
Wed, 25 Jul 2018 02:20:51 +0000 (11:50 +0930)
Extends commit 898ade12ee8 to cover other targets.

* elf32-arm.c (elf32_arm_nabi_write_core_note): Disable
-Wstringop-truncation warning for gcc-8.0 too.
* elf32-ppc.c (ppc_elf_write_core_note): Likewise.
* elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
* elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
* elf32-s390.c (elf_s390_write_core_note): Comment fix.
* elf64-s390.c (elf_s390_write_core_note): Likewise.

bfd/ChangeLog
bfd/elf32-arm.c
bfd/elf32-ppc.c
bfd/elf32-s390.c
bfd/elf64-ppc.c
bfd/elf64-s390.c
bfd/elfxx-aarch64.c

index bdbb3ff4f472ff0c06cd55cee7ac28a891192941..8efa3870933d2a12c8a6601a2149d8efd0f8ba6f 100644 (file)
@@ -1,3 +1,13 @@
+2018-07-25  Alan Modra  <amodra@gmail.com>
+
+       * elf32-arm.c (elf32_arm_nabi_write_core_note): Disable
+       -Wstringop-truncation warning for gcc-8.0 too.
+       * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
+       * elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
+       * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
+       * elf32-s390.c (elf_s390_write_core_note): Comment fix.
+       * elf64-s390.c (elf_s390_write_core_note): Likewise.
+
 2018-07-24  Alan Modra  <amodra@gmail.com>
 
        PR 23430
index c5077a53085782236c288274d29347139d31e4b7..2c321bbcb65455b10b223316acbad03e27a0b1b3 100644 (file)
@@ -2174,16 +2174,16 @@ elf32_arm_nabi_write_core_note (bfd *abfd, char *buf, int *bufsiz,
        va_start (ap, note_type);
        memset (data, 0, sizeof (data));
        strncpy (data + 28, va_arg (ap, const char *), 16);
-#if GCC_VERSION == 8001
+#if GCC_VERSION == 8000 || GCC_VERSION == 8001
        DIAGNOSTIC_PUSH;
-       /* GCC 8.1 warns about 80 equals destination size with
+       /* GCC 8.0 and 8.1 warn about 80 equals destination size with
           -Wstringop-truncation:
           https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85643
         */
        DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION;
 #endif
        strncpy (data + 44, va_arg (ap, const char *), 80);
-#if GCC_VERSION == 8001
+#if GCC_VERSION == 8000 || GCC_VERSION == 8001
        DIAGNOSTIC_POP;
 #endif
        va_end (ap);
index 5e9251bdb9faad12b85d26fb03c41a50e243cfb9..1ddfc6c1f400b9bff6e07e16b96f7736b3d20598 100644 (file)
@@ -2411,16 +2411,16 @@ ppc_elf_write_core_note (bfd *abfd, char *buf, int *bufsiz, int note_type, ...)
        va_start (ap, note_type);
        memset (data, 0, sizeof (data));
        strncpy (data + 32, va_arg (ap, const char *), 16);
-#if GCC_VERSION == 8001
+#if GCC_VERSION == 8000 || GCC_VERSION == 8001
        DIAGNOSTIC_PUSH;
-       /* GCC 8.1 warns about 80 equals destination size with
+       /* GCC 8.0 and 8.1 warn about 80 equals destination size with
           -Wstringop-truncation:
           https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85643
         */
        DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION;
 #endif
        strncpy (data + 48, va_arg (ap, const char *), 80);
-#if GCC_VERSION == 8001
+#if GCC_VERSION == 8000 || GCC_VERSION == 8001
        DIAGNOSTIC_POP;
 #endif
        va_end (ap);
index c47bbabc2c5b4cdb14747d3a2e0a23f3ec8a85ac..448c64dcfce0b96a2f34d58f64edefcc039b0abb 100644 (file)
@@ -3953,7 +3953,7 @@ elf_s390_write_core_note (bfd *abfd, char *buf, int *bufsiz,
        strncpy (data + 28, fname, 16);
 #if GCC_VERSION == 8000 || GCC_VERSION == 8001
        DIAGNOSTIC_PUSH;
-       /* GCC 8.1 warns about 80 equals destination size with
+       /* GCC 8.0 and 8.1 warn about 80 equals destination size with
           -Wstringop-truncation:
           https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85643
         */
index 45d81777eb7019379c53c987beaa89245b6a72bd..6b293ce5fd7caa78e0e1c78201868a050553b1c9 100644 (file)
@@ -3041,16 +3041,16 @@ ppc64_elf_write_core_note (bfd *abfd, char *buf, int *bufsiz, int note_type,
        va_start (ap, note_type);
        memset (data, 0, sizeof (data));
        strncpy (data + 40, va_arg (ap, const char *), 16);
-#if GCC_VERSION == 8001
+#if GCC_VERSION == 8000 || GCC_VERSION == 8001
        DIAGNOSTIC_PUSH;
-       /* GCC 8.1 warns about 80 equals destination size with
+       /* GCC 8.0 and 8.1 warn about 80 equals destination size with
           -Wstringop-truncation:
           https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85643
         */
        DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION;
 #endif
        strncpy (data + 56, va_arg (ap, const char *), 80);
-#if GCC_VERSION == 8001
+#if GCC_VERSION == 8000 || GCC_VERSION == 8001
        DIAGNOSTIC_POP;
 #endif
        va_end (ap);
index 16a62a3d7c8cb038a3e5e49c8ee1b70098af1702..91b76bcc8a907b73dd9ca87b5f1ab141634a486e 100644 (file)
@@ -3787,7 +3787,7 @@ elf_s390_write_core_note (bfd *abfd, char *buf, int *bufsiz,
        strncpy (data + 40, fname, 16);
 #if GCC_VERSION == 8000 || GCC_VERSION == 8001
        DIAGNOSTIC_PUSH;
-       /* GCC 8.1 warns about 80 equals destination size with
+       /* GCC 8.0 and 8.1 warn about 80 equals destination size with
           -Wstringop-truncation:
           https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85643
         */
index af02f2e48e188e32e4559bd77f8c190d651ac8b3..b8a541a9ddac6f8361a1858523cc0f8478e9b0f4 100644 (file)
@@ -640,16 +640,16 @@ _bfd_aarch64_elf_write_core_note (bfd *abfd, char *buf, int *bufsiz, int note_ty
        va_start (ap, note_type);
        memset (data, 0, sizeof (data));
        strncpy (data + 40, va_arg (ap, const char *), 16);
-#if GCC_VERSION == 8001
+#if GCC_VERSION == 8000 || GCC_VERSION == 8001
        DIAGNOSTIC_PUSH;
-       /* GCC 8.1 warns about 80 equals destination size with
+       /* GCC 8.0 and 8.1 warn about 80 equals destination size with
           -Wstringop-truncation:
           https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85643
         */
        DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION;
 #endif
        strncpy (data + 56, va_arg (ap, const char *), 80);
-#if GCC_VERSION == 8001
+#if GCC_VERSION == 8000 || GCC_VERSION == 8001
        DIAGNOSTIC_POP;
 #endif
        va_end (ap);