* [PATCH 1/3] Move gdb/common/diagnostics.h to include/diagnostics.h
@ 2018-05-21 12:16 H.J. Lu
2018-05-21 13:10 ` [PATCH 2/3] Add DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION H.J. Lu
` (4 more replies)
0 siblings, 5 replies; 20+ messages in thread
From: H.J. Lu @ 2018-05-21 12:16 UTC (permalink / raw)
To: binutils; +Cc: gdb-patches
Move gdb/common/diagnostics.h to include/diagnostics.h so that it can
be used in binutils.
gdb/
* ada-lex.l: Include "diagnostics.h" instead of
"common/diagnostics.h".
* unittests/environ-selftests.c: Likewise.
* common/diagnostics.h: Moved to ../include.
include/
* diagnostics.h: Moved from ../gdb/common/diagnostics.h.
---
gdb/ada-lex.l | 2 +-
gdb/unittests/environ-selftests.c | 2 +-
{gdb/common => include}/diagnostics.h | 10 +++-------
3 files changed, 5 insertions(+), 9 deletions(-)
rename {gdb/common => include}/diagnostics.h (92%)
diff --git a/gdb/ada-lex.l b/gdb/ada-lex.l
index c83a619833..621ebb2a95 100644
--- a/gdb/ada-lex.l
+++ b/gdb/ada-lex.l
@@ -41,7 +41,7 @@ POSEXP (e"+"?{NUM10})
%{
-#include "common/diagnostics.h"
+#include "diagnostics.h"
/* Some old versions of flex generate code that uses the "register" keyword,
which clang warns about. This was observed for example with flex 2.5.35,
diff --git a/gdb/unittests/environ-selftests.c b/gdb/unittests/environ-selftests.c
index a66e8c7a48..31b7ebf9c1 100644
--- a/gdb/unittests/environ-selftests.c
+++ b/gdb/unittests/environ-selftests.c
@@ -20,7 +20,7 @@
#include "defs.h"
#include "selftest.h"
#include "common/environ.h"
-#include "common/diagnostics.h"
+#include "diagnostics.h"
static const char gdb_selftest_env_var[] = "GDB_SELFTEST_ENVIRON";
diff --git a/gdb/common/diagnostics.h b/include/diagnostics.h
similarity index 92%
rename from gdb/common/diagnostics.h
rename to include/diagnostics.h
index e631f506de..0725664177 100644
--- a/gdb/common/diagnostics.h
+++ b/include/diagnostics.h
@@ -1,7 +1,5 @@
/* Copyright (C) 2017-2018 Free Software Foundation, Inc.
- This file is part of GDB.
-
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
@@ -15,10 +13,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#ifndef COMMON_DIAGNOSTICS_H
-#define COMMON_DIAGNOSTICS_H
-
-#include "common/preprocessor.h"
+#ifndef DIAGNOSTICS_H
+#define DIAGNOSTICS_H
#ifdef __GNUC__
# define DIAGNOSTIC_PUSH _Pragma ("GCC diagnostic push")
@@ -61,4 +57,4 @@
#endif
-#endif /* COMMON_DIAGNOSTICS_H */
+#endif /* DIAGNOSTICS_H */
--
2.17.0
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 2/3] Add DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION
2018-05-21 12:16 [PATCH 1/3] Move gdb/common/diagnostics.h to include/diagnostics.h H.J. Lu
@ 2018-05-21 13:10 ` H.J. Lu
2018-06-01 7:57 ` Nick Clifton
2018-05-21 13:12 ` [PATCH 3/3] Use DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION to silence GCC 8 H.J. Lu
` (3 subsequent siblings)
4 siblings, 1 reply; 20+ messages in thread
From: H.J. Lu @ 2018-05-21 13:10 UTC (permalink / raw)
To: binutils; +Cc: gdb-patches
Add DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION for GCC 8 to silence
-Wstringop-truncation warning:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85643
* diagnostics.h (DIAGNOSTIC_STRINGIFY_1): New.
(DIAGNOSTIC_STRINGIFY): Likewise.
(DIAGNOSTIC_IGNORE): Replace STRINGIFY with DIAGNOSTIC_STRINGIFY.
(DIAGNOSTIC_IGNORE_SELF_MOVE): Define empty if not defined.
(DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER): Likewise.
(DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): Likewise.
(DIAGNOSTIC_IGNORE_SWITCH_DIFFERENT_ENUM_TYPES): Likewise.
(DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION): New.
---
include/diagnostics.h | 31 ++++++++++++++++++++++++-------
1 file changed, 24 insertions(+), 7 deletions(-)
diff --git a/include/diagnostics.h b/include/diagnostics.h
index 0725664177..ec5ac4190e 100644
--- a/include/diagnostics.h
+++ b/include/diagnostics.h
@@ -19,8 +19,13 @@
#ifdef __GNUC__
# define DIAGNOSTIC_PUSH _Pragma ("GCC diagnostic push")
# define DIAGNOSTIC_POP _Pragma ("GCC diagnostic pop")
+
+/* Stringification. */
+# define DIAGNOSTIC_STRINGIFY_1(x) #x
+# define DIAGNOSTIC_STRINGIFY(x) DIAGNOSTIC_STRINGIFY_1 (x)
+
# define DIAGNOSTIC_IGNORE(option) \
- _Pragma (STRINGIFY (GCC diagnostic ignored option))
+ _Pragma (DIAGNOSTIC_STRINGIFY (GCC diagnostic ignored option))
#else
# define DIAGNOSTIC_PUSH
# define DIAGNOSTIC_POP
@@ -37,24 +42,36 @@
# if __has_warning ("-Wenum-compare-switch")
# define DIAGNOSTIC_IGNORE_SWITCH_DIFFERENT_ENUM_TYPES \
DIAGNOSTIC_IGNORE ("-Wenum-compare-switch")
-# else
-# define DIAGNOSTIC_IGNORE_SWITCH_DIFFERENT_ENUM_TYPES
# endif
#elif defined (__GNUC__) /* GCC */
-# define DIAGNOSTIC_IGNORE_SELF_MOVE
-# define DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER
# define DIAGNOSTIC_IGNORE_UNUSED_FUNCTION \
DIAGNOSTIC_IGNORE ("-Wunused-function")
-# define DIAGNOSTIC_IGNORE_SWITCH_DIFFERENT_ENUM_TYPES
-#else /* Other compilers */
+# if __GNUC__ >= 8
+# define DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION \
+ DIAGNOSTIC_IGNORE ("-Wstringop-truncation")
+# endif
+#endif
+#ifndef DIAGNOSTIC_IGNORE_SELF_MOVE
# define DIAGNOSTIC_IGNORE_SELF_MOVE
+#endif
+
+#ifndef DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER
# define DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER
+#endif
+
+#ifndef DIAGNOSTIC_IGNORE_UNUSED_FUNCTION
# define DIAGNOSTIC_IGNORE_UNUSED_FUNCTION
+#endif
+
+#ifndef DIAGNOSTIC_IGNORE_SWITCH_DIFFERENT_ENUM_TYPES
# define DIAGNOSTIC_IGNORE_SWITCH_DIFFERENT_ENUM_TYPES
+#endif
+#ifndef DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION
+# define DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION
#endif
#endif /* DIAGNOSTICS_H */
--
2.17.0
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 3/3] Use DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION to silence GCC 8
2018-05-21 12:16 [PATCH 1/3] Move gdb/common/diagnostics.h to include/diagnostics.h H.J. Lu
2018-05-21 13:10 ` [PATCH 2/3] Add DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION H.J. Lu
@ 2018-05-21 13:12 ` H.J. Lu
2018-06-01 7:59 ` Nick Clifton
2018-05-21 14:12 ` [PATCH 1/3] Move gdb/common/diagnostics.h to include/diagnostics.h Simon Marchi
` (2 subsequent siblings)
4 siblings, 1 reply; 20+ messages in thread
From: H.J. Lu @ 2018-05-21 13:12 UTC (permalink / raw)
To: binutils; +Cc: gdb-patches
GCC 8 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.
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 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.
---
bfd/bfd-in.h | 1 +
bfd/bfd-in2.h | 1 +
bfd/elf32-arm.c | 7 +++++++
bfd/elf32-ppc.c | 7 +++++++
bfd/elf32-s390.c | 7 +++++++
bfd/elf64-ppc.c | 7 +++++++
bfd/elf64-s390.c | 7 +++++++
bfd/elfxx-aarch64.c | 7 +++++++
8 files changed, 44 insertions(+)
diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h
index 481587e458..1d477c3f5f 100644
--- a/bfd/bfd-in.h
+++ b/bfd/bfd-in.h
@@ -34,6 +34,7 @@ extern "C" {
#include "ansidecl.h"
#include "symcat.h"
+#include "diagnostics.h"
#include <stdarg.h>
#include <sys/stat.h>
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index c64eee1fe1..4a5c51fdf8 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -41,6 +41,7 @@ extern "C" {
#include "ansidecl.h"
#include "symcat.h"
+#include "diagnostics.h"
#include <stdarg.h>
#include <sys/stat.h>
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index 5a3b58ff0d..4e04a2f699 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -2174,7 +2174,14 @@ 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);
+ DIAGNOSTIC_PUSH;
+ /* GCC 8 warns about 80 equals destination size with
+ -Wstringop-truncation:
+ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85643
+ */
+ DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION;
strncpy (data + 44, va_arg (ap, const char *), 80);
+ DIAGNOSTIC_POP;
va_end (ap);
return elfcore_write_note (abfd, buf, bufsiz,
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 462c8af311..b5cb14ecbf 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -2411,7 +2411,14 @@ 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);
+ DIAGNOSTIC_PUSH;
+ /* GCC 8 warns about 80 equals destination size with
+ -Wstringop-truncation:
+ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85643
+ */
+ DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION;
strncpy (data + 48, va_arg (ap, const char *), 80);
+ DIAGNOSTIC_POP;
va_end (ap);
return elfcore_write_note (abfd, buf, bufsiz,
"CORE", note_type, data, sizeof (data));
diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c
index b3603bd865..b9e1602aa2 100644
--- a/bfd/elf32-s390.c
+++ b/bfd/elf32-s390.c
@@ -3951,7 +3951,14 @@ elf_s390_write_core_note (bfd *abfd, char *buf, int *bufsiz,
va_end (ap);
strncpy (data + 28, fname, 16);
+ DIAGNOSTIC_PUSH;
+ /* GCC 8 warns about 80 equals destination size with
+ -Wstringop-truncation:
+ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85643
+ */
+ DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION;
strncpy (data + 44, psargs, 80);
+ DIAGNOSTIC_POP;
return elfcore_write_note (abfd, buf, bufsiz, "CORE", note_type,
&data, sizeof (data));
}
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index b166558945..bf314b3571 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -3041,7 +3041,14 @@ 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);
+ DIAGNOSTIC_PUSH;
+ /* GCC 8 warns about 80 equals destination size with
+ -Wstringop-truncation:
+ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85643
+ */
+ DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION;
strncpy (data + 56, va_arg (ap, const char *), 80);
+ DIAGNOSTIC_POP;
va_end (ap);
return elfcore_write_note (abfd, buf, bufsiz,
"CORE", note_type, data, sizeof (data));
diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c
index bfa02340ca..4552bd6ee8 100644
--- a/bfd/elf64-s390.c
+++ b/bfd/elf64-s390.c
@@ -3760,7 +3760,14 @@ elf_s390_write_core_note (bfd *abfd, char *buf, int *bufsiz,
va_end (ap);
strncpy (data + 40, fname, 16);
+ DIAGNOSTIC_PUSH;
+ /* GCC 8 warns about 80 equals destination size with
+ -Wstringop-truncation:
+ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85643
+ */
+ DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION;
strncpy (data + 56, psargs, 80);
+ DIAGNOSTIC_POP;
return elfcore_write_note (abfd, buf, bufsiz, "CORE", note_type,
&data, sizeof (data));
}
diff --git a/bfd/elfxx-aarch64.c b/bfd/elfxx-aarch64.c
index 45a732db2b..f418581048 100644
--- a/bfd/elfxx-aarch64.c
+++ b/bfd/elfxx-aarch64.c
@@ -659,7 +659,14 @@ _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);
+ DIAGNOSTIC_PUSH;
+ /* GCC 8 warns about 80 equals destination size with
+ -Wstringop-truncation:
+ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85643
+ */
+ DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION;
strncpy (data + 56, va_arg (ap, const char *), 80);
+ DIAGNOSTIC_POP;
va_end (ap);
return elfcore_write_note (abfd, buf, bufsiz, "CORE",
--
2.17.0
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 1/3] Move gdb/common/diagnostics.h to include/diagnostics.h
2018-05-21 12:16 [PATCH 1/3] Move gdb/common/diagnostics.h to include/diagnostics.h H.J. Lu
2018-05-21 13:10 ` [PATCH 2/3] Add DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION H.J. Lu
2018-05-21 13:12 ` [PATCH 3/3] Use DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION to silence GCC 8 H.J. Lu
@ 2018-05-21 14:12 ` Simon Marchi
2018-06-01 7:49 ` Nick Clifton
[not found] ` <B781F464-751E-4D45-8881-36F6003759BE@glasgow.ac.uk>
4 siblings, 0 replies; 20+ messages in thread
From: Simon Marchi @ 2018-05-21 14:12 UTC (permalink / raw)
To: H.J. Lu; +Cc: binutils, gdb-patches
On 2018-05-21 08:15, H.J. Lu wrote:
> Move gdb/common/diagnostics.h to include/diagnostics.h so that it can
> be used in binutils.
>
> gdb/
>
> * ada-lex.l: Include "diagnostics.h" instead of
> "common/diagnostics.h".
> * unittests/environ-selftests.c: Likewise.
> * common/diagnostics.h: Moved to ../include.
>
> include/
>
> * diagnostics.h: Moved from ../gdb/common/diagnostics.h.
This series looks OK from the GDB side.
Thanks,
Simon
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 1/3] Move gdb/common/diagnostics.h to include/diagnostics.h
2018-05-21 12:16 [PATCH 1/3] Move gdb/common/diagnostics.h to include/diagnostics.h H.J. Lu
` (2 preceding siblings ...)
2018-05-21 14:12 ` [PATCH 1/3] Move gdb/common/diagnostics.h to include/diagnostics.h Simon Marchi
@ 2018-06-01 7:49 ` Nick Clifton
[not found] ` <B781F464-751E-4D45-8881-36F6003759BE@glasgow.ac.uk>
4 siblings, 0 replies; 20+ messages in thread
From: Nick Clifton @ 2018-06-01 7:49 UTC (permalink / raw)
To: H.J. Lu, binutils; +Cc: gdb-patches
Hi H.J.
> gdb/
>
> * ada-lex.l: Include "diagnostics.h" instead of
> "common/diagnostics.h".
> * unittests/environ-selftests.c: Likewise.
> * common/diagnostics.h: Moved to ../include.
>
> include/
>
> * diagnostics.h: Moved from ../gdb/common/diagnostics.h.
Approved from the binutils side as well. Please commit.
Cheers
Nick
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 2/3] Add DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION
2018-05-21 13:10 ` [PATCH 2/3] Add DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION H.J. Lu
@ 2018-06-01 7:57 ` Nick Clifton
[not found] ` <20180601101949.GA7660@bubble.grove.modra.org>
0 siblings, 1 reply; 20+ messages in thread
From: Nick Clifton @ 2018-06-01 7:57 UTC (permalink / raw)
To: H.J. Lu, binutils; +Cc: gdb-patches
Hi H.J.
> +# if __GNUC__ >= 8
> +# define DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION \
> + DIAGNOSTIC_IGNORE ("-Wstringop-truncation")
> +# endif
> +#endif
Presumably the Wstringop-truncation bug will be fixed in gcc 8.1
so shouldn't the test check the revision number as well ?
Cheers
Nick
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 3/3] Use DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION to silence GCC 8
2018-05-21 13:12 ` [PATCH 3/3] Use DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION to silence GCC 8 H.J. Lu
@ 2018-06-01 7:59 ` Nick Clifton
2018-06-04 16:58 ` H.J. Lu
0 siblings, 1 reply; 20+ messages in thread
From: Nick Clifton @ 2018-06-01 7:59 UTC (permalink / raw)
To: H.J. Lu, binutils; +Cc: gdb-patches
Hi H.J.
> 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 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.
Approved - please apply.
Cheers
Nick
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 2/3] Add DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION
[not found] ` <20180601101949.GA7660@bubble.grove.modra.org>
@ 2018-06-01 16:51 ` H.J. Lu
2018-06-04 12:13 ` Nick Clifton
0 siblings, 1 reply; 20+ messages in thread
From: H.J. Lu @ 2018-06-01 16:51 UTC (permalink / raw)
To: Alan Modra; +Cc: Nick Clifton, Binutils, GDB
[-- Attachment #1: Type: text/plain, Size: 738 bytes --]
On Fri, Jun 1, 2018 at 3:19 AM, Alan Modra <amodra@gmail.com> wrote:
> On Fri, Jun 01, 2018 at 08:57:20AM +0100, Nick Clifton wrote:
>> Hi H.J.
>>
>> > +# if __GNUC__ >= 8
>> > +# define DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION \
>> > + DIAGNOSTIC_IGNORE ("-Wstringop-truncation")
>> > +# endif
>> > +#endif
>>
>> Presumably the Wstringop-truncation bug will be fixed in gcc 8.1
>> so shouldn't the test check the revision number as well ?
>
> Yes, it has already been fixed.
>
The bug is in GCC 8.1 and will be fixed in GCC 8.2. Here is the
updated patch with
+# if __GNUC__ == 8 && __GNUC_MINOR__ < 2
+# define DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION \
+ DIAGNOSTIC_IGNORE ("-Wstringop-truncation")
+# endif
OK for master?
--
H.J.
[-- Attachment #2: 0001-Add-DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION.patch --]
[-- Type: text/x-patch, Size: 2799 bytes --]
From bb1d3ddd78abf25b30e11cf25e4b2ec7b6ef0688 Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Mon, 21 May 2018 05:06:39 -0700
Subject: [PATCH 1/2] Add DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION
Add DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION for GCC 8.1 to silence
-Wstringop-truncation warning:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85643
* diagnostics.h (DIAGNOSTIC_STRINGIFY_1): New.
(DIAGNOSTIC_STRINGIFY): Likewise.
(DIAGNOSTIC_IGNORE): Replace STRINGIFY with DIAGNOSTIC_STRINGIFY.
(DIAGNOSTIC_IGNORE_SELF_MOVE): Define empty if not defined.
(DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER): Likewise.
(DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): Likewise.
(DIAGNOSTIC_IGNORE_SWITCH_DIFFERENT_ENUM_TYPES): Likewise.
(DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION): New.
---
include/diagnostics.h | 31 ++++++++++++++++++++++++-------
1 file changed, 24 insertions(+), 7 deletions(-)
diff --git a/include/diagnostics.h b/include/diagnostics.h
index 0725664177..f7412d4a38 100644
--- a/include/diagnostics.h
+++ b/include/diagnostics.h
@@ -19,8 +19,13 @@
#ifdef __GNUC__
# define DIAGNOSTIC_PUSH _Pragma ("GCC diagnostic push")
# define DIAGNOSTIC_POP _Pragma ("GCC diagnostic pop")
+
+/* Stringification. */
+# define DIAGNOSTIC_STRINGIFY_1(x) #x
+# define DIAGNOSTIC_STRINGIFY(x) DIAGNOSTIC_STRINGIFY_1 (x)
+
# define DIAGNOSTIC_IGNORE(option) \
- _Pragma (STRINGIFY (GCC diagnostic ignored option))
+ _Pragma (DIAGNOSTIC_STRINGIFY (GCC diagnostic ignored option))
#else
# define DIAGNOSTIC_PUSH
# define DIAGNOSTIC_POP
@@ -37,24 +42,36 @@
# if __has_warning ("-Wenum-compare-switch")
# define DIAGNOSTIC_IGNORE_SWITCH_DIFFERENT_ENUM_TYPES \
DIAGNOSTIC_IGNORE ("-Wenum-compare-switch")
-# else
-# define DIAGNOSTIC_IGNORE_SWITCH_DIFFERENT_ENUM_TYPES
# endif
#elif defined (__GNUC__) /* GCC */
-# define DIAGNOSTIC_IGNORE_SELF_MOVE
-# define DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER
# define DIAGNOSTIC_IGNORE_UNUSED_FUNCTION \
DIAGNOSTIC_IGNORE ("-Wunused-function")
-# define DIAGNOSTIC_IGNORE_SWITCH_DIFFERENT_ENUM_TYPES
-#else /* Other compilers */
+# if __GNUC__ == 8 && __GNUC_MINOR__ < 2
+# define DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION \
+ DIAGNOSTIC_IGNORE ("-Wstringop-truncation")
+# endif
+#endif
+#ifndef DIAGNOSTIC_IGNORE_SELF_MOVE
# define DIAGNOSTIC_IGNORE_SELF_MOVE
+#endif
+
+#ifndef DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER
# define DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER
+#endif
+
+#ifndef DIAGNOSTIC_IGNORE_UNUSED_FUNCTION
# define DIAGNOSTIC_IGNORE_UNUSED_FUNCTION
+#endif
+
+#ifndef DIAGNOSTIC_IGNORE_SWITCH_DIFFERENT_ENUM_TYPES
# define DIAGNOSTIC_IGNORE_SWITCH_DIFFERENT_ENUM_TYPES
+#endif
+#ifndef DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION
+# define DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION
#endif
#endif /* DIAGNOSTICS_H */
--
2.17.0
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 2/3] Add DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION
2018-06-01 16:51 ` H.J. Lu
@ 2018-06-04 12:13 ` Nick Clifton
2018-06-04 12:19 ` Pedro Alves
0 siblings, 1 reply; 20+ messages in thread
From: Nick Clifton @ 2018-06-04 12:13 UTC (permalink / raw)
To: H.J. Lu, Alan Modra; +Cc: Binutils, GDB
Hi H.J.
> +# if __GNUC__ == 8 && __GNUC_MINOR__ < 2
> +# define DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION \
> + DIAGNOSTIC_IGNORE ("-Wstringop-truncation")
> +# endif
>
> OK for master?
Approved - please apply.
Cheers
Nick
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 2/3] Add DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION
2018-06-04 12:13 ` Nick Clifton
@ 2018-06-04 12:19 ` Pedro Alves
2018-06-04 12:46 ` H.J. Lu
0 siblings, 1 reply; 20+ messages in thread
From: Pedro Alves @ 2018-06-04 12:19 UTC (permalink / raw)
To: Nick Clifton, H.J. Lu, Alan Modra; +Cc: Binutils, GDB
On 06/04/2018 01:13 PM, Nick Clifton wrote:
> Hi H.J.
>
>> +# if __GNUC__ == 8 && __GNUC_MINOR__ < 2
>> +# define DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION \
>> + DIAGNOSTIC_IGNORE ("-Wstringop-truncation")
>> +# endif
>>
>> OK for master?
>
> Approved - please apply.
Please don't. This is again going against the intention of
the header. The GCC version checks should be put in the
places where the warning needs to be suppressed.
The current patch makes all current and future uses of
DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION only apply to
GCC 8.1. That is incorrect. Consider what you will
have to do to suppress some -Wstrinop-truncation warning
with DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION on GCC 8.2 or
GCC 9 or whatever.
Also, you can use GCC_VERSION to make the version check
a little simpler.
Thanks,
Pedro Alves
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 2/3] Add DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION
2018-06-04 12:19 ` Pedro Alves
@ 2018-06-04 12:46 ` H.J. Lu
[not found] ` <CAMe9rOox6mZ6MX=GyC7-XJ2GuDzc5cjrLDyc3Hei5gBR4fWw7w@mail.gmail.com>
2018-06-04 14:04 ` Pedro Alves
0 siblings, 2 replies; 20+ messages in thread
From: H.J. Lu @ 2018-06-04 12:46 UTC (permalink / raw)
To: Pedro Alves; +Cc: Nick Clifton, Alan Modra, Binutils, GDB
On Mon, Jun 4, 2018 at 5:19 AM, Pedro Alves <palves@redhat.com> wrote:
> On 06/04/2018 01:13 PM, Nick Clifton wrote:
>> Hi H.J.
>>
>>> +# if __GNUC__ == 8 && __GNUC_MINOR__ < 2
>>> +# define DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION \
>>> + DIAGNOSTIC_IGNORE ("-Wstringop-truncation")
>>> +# endif
>>>
>>> OK for master?
>>
>> Approved - please apply.
>
> Please don't. This is again going against the intention of
> the header. The GCC version checks should be put in the
> places where the warning needs to be suppressed.
> The current patch makes all current and future uses of
> DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION only apply to
> GCC 8.1. That is incorrect. Consider what you will
> have to do to suppress some -Wstrinop-truncation warning
> with DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION on GCC 8.2 or
> GCC 9 or whatever.
This is what my original patch intended to do. But diagnostics.h from
GDB doesn't support GCC version. Should I extend it to match glibc?
> Also, you can use GCC_VERSION to make the version check
> a little simpler.
>
> Thanks,
> Pedro Alves
--
H.J.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 1/3] Move gdb/common/diagnostics.h to include/diagnostics.h
[not found] ` <B781F464-751E-4D45-8881-36F6003759BE@glasgow.ac.uk>
@ 2018-06-04 13:12 ` H.J. Lu
2018-06-04 13:24 ` John Marshall
2018-06-04 13:35 ` Pedro Alves
0 siblings, 2 replies; 20+ messages in thread
From: H.J. Lu @ 2018-06-04 13:12 UTC (permalink / raw)
To: John Marshall; +Cc: binutils, gdb-patches
On Mon, Jun 4, 2018 at 3:51 AM, John Marshall
<John.W.Marshall@glasgow.ac.uk> wrote:
> On 21 May 2018, at 13:15, H dot J dot Lu <hjl dot tools at gmail dot com> wrote:
>> Move gdb/common/diagnostics.h to include/diagnostics.h so that it can
>> be used in binutils.
>
> This patch broke building gdb on MacOS with clang (i.e., after ./configure with no options):
>
> CXX gdb.o
> In file included from ../../../binutils-gdb/gdb/gdb.c:19:
> In file included from ../../../binutils-gdb/gdb/defs.h:531:
> In file included from ../../../binutils-gdb/gdb/gdbarch.h:39:
> In file included from ../../../binutils-gdb/gdb/frame.h:72:
> In file included from ../../../binutils-gdb/gdb/language.h:26:
> ../../../binutils-gdb/gdb/symtab.h:1361:1: error: _Pragma takes a parenthesized string literal
> DEF_VEC_P (symtab_ptr);
>
>> --- a/gdb/common/diagnostics.h
>> +++ b/include/diagnostics.h
>> [snip]
>> @@ -15,10 +13,8 @@
>> You should have received a copy of the GNU General Public License
>> along with this program. If not, see <http://www.gnu.org/licenses/>. */
>>
>> -#ifndef COMMON_DIAGNOSTICS_H
>> -#define COMMON_DIAGNOSTICS_H
>> -
>> -#include "common/preprocessor.h"
>
> Putting this #include back fixes the build. Apparently in this configuration, include/diagnostics.h doesn't otherwise have a definition of STRINGIFY whereas on Linux or other platforms it does, via some coincidence of different host-related includes or something.
Please add
#include "common/preprocessor.h"
to gdb.c.
--
H.J.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 1/3] Move gdb/common/diagnostics.h to include/diagnostics.h
2018-06-04 13:12 ` H.J. Lu
@ 2018-06-04 13:24 ` John Marshall
2018-06-04 13:35 ` Pedro Alves
1 sibling, 0 replies; 20+ messages in thread
From: John Marshall @ 2018-06-04 13:24 UTC (permalink / raw)
To: H.J. Lu; +Cc: binutils, gdb-patches
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="us-ascii", Size: 30349 bytes --]
On 4 Jun 2018, at 14:12, H.J. Lu <hjl.tools@gmail.com> wrote:
> Please add
>
> #include "common/preprocessor.h"
>
> to gdb.c.
The problem occurs in other source files too. (And I'm not a GDB maintainer, so I won't be adding anything to anything :-))
> Move gdb/common/diagnostics.h to include/diagnostics.h so that it can
> be used in binutils.
If the intention is to use include/diagnostics.h in binutils outwith GDB, then gdb/common/preprocessor.h will need to follow diagnostics.h to include/. (Or at least a definition of STRINGIFY will need to be in include/ -- but preprocessor.h seems as generic as diagnostics.h in any case, so it seems appropriate to just move it all.)
John
From gdb-patches-return-147917-listarch-gdb-patches=sources.redhat.com@sourceware.org Mon Jun 04 13:29:17 2018
Return-Path: <gdb-patches-return-147917-listarch-gdb-patches=sources.redhat.com@sourceware.org>
Delivered-To: listarch-gdb-patches@sources.redhat.com
Received: (qmail 17935 invoked by alias); 4 Jun 2018 13:29:16 -0000
Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm
Precedence: bulk
List-Id: <gdb-patches.sourceware.org>
List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org>
List-Archive: <http://sourceware.org/ml/gdb-patches/>
List-Post: <mailto:gdb-patches@sourceware.org>
List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs>
Sender: gdb-patches-owner@sourceware.org
Delivered-To: mailing list gdb-patches@sourceware.org
Received: (qmail 15066 invoked by uid 89); 4 Jun 2018 13:29:15 -0000
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-26.0 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,MIME_BASE64_BLANKS,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=v30
X-HELO: EUR01-VE1-obe.outbound.protection.outlook.com
Received: from mail-ve1eur01on0042.outbound.protection.outlook.com (HELO EUR01-VE1-obe.outbound.protection.outlook.com) (104.47.1.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 04 Jun 2018 13:29:12 +0000
Received: from DB6PR0802MB2133.eurprd08.prod.outlook.com (10.172.226.148) by DB6PR0802MB2165.eurprd08.prod.outlook.com (10.172.227.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.820.13; Mon, 4 Jun 2018 13:29:08 +0000
Received: from DB6PR0802MB2133.eurprd08.prod.outlook.com ([fe80::d984:bdee:1856:c64]) by DB6PR0802MB2133.eurprd08.prod.outlook.com ([fe80::d984:bdee:1856:c64%7]) with mapi id 15.20.0820.010; Mon, 4 Jun 2018 13:29:08 +0000
From: Alan Hayward <Alan.Hayward@arm.com>
To: Simon Marchi <simon.marchi@ericsson.com>, Pedro Alves <palves@redhat.com>
CC: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>, nd <nd@arm.com>
Subject: Re: [PATCH 6/8] Aarch64 SVE pseudo register support
Date: Mon, 04 Jun 2018 13:29:00 -0000
Message-ID: <EF0FC273-E2F7-4C0D-8907-E7BB5BA239AD@arm.com>
References: <20180511105256.27388-1-alan.hayward@arm.com> <20180511105256.27388-7-alan.hayward@arm.com> <d10c31c5-4111-b8ac-431e-359476ec85e8@ericsson.com>
In-Reply-To: <d10c31c5-4111-b8ac-431e-359476ec85e8@ericsson.com>
authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alan.Hayward@arm.com;
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1;DB6PR0802MB2165;7:cbAN5Q7AlcsBY6WrJiycnH6g9mPxATn462HpFJgmjfEF955pF+3ZvOQ24xQBNFUvt8RU0lkRZ/Tc0KvKwggz2tKh7gBJtNjH4kg+EAPWIscNSQejcP6PS8S+w9/D4qqketArH8Ly++Wr1yuTtsal72a85pobpLmVyPoPMsDrFKJZS7tvwn8o74EPtntfFsRwZ9C1y5lP4ZRRsAToMdYCejzWUfbIRUeWHb6I5cqwvxnEgVWSGPjDEZgXpP/SwXn7
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:DB6PR0802MB2165;
x-ms-traffictypediagnostic: DB6PR0802MB2165:
nodisclaimer: True
x-microsoft-antispam-prvs: <DB6PR0802MB2165E8446BF9CE8A59FF580B97670@DB6PR0802MB2165.eurprd08.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(37575265505322);
x-ms-exchange-senderadcheck: 1
x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(3231254)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011)(7699016);SRVR:DB6PR0802MB2165;BCL:0;PCL:0;RULEID:;SRVR:DB6PR0802MB2165;
x-forefront-prvs: 069373DFB6
x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(366004)(396003)(39860400002)(39380400002)(376002)(346002)(189003)(199004)(26005)(3280700002)(53546011)(8676002)(59450400001)(6506007)(54906003)(76176011)(110136005)(81156014)(81166006)(72206003)(478600001)(6512007)(53936002)(6246003)(50226002)(25786009)(4326008)(8936002)(5250100002)(33656002)(5660300001)(68736007)(14454004)(106356001)(99286004)(105586002)(7736002)(66066001)(476003)(305945005)(6486002)(83716003)(229853002)(186003)(486006)(6436002)(82746002)(57306001)(2616005)(446003)(11346002)(6116002)(3846002)(3660700001)(2900100001)(102836004)(86362001)(2906002)(36756003)(316002)(97736004);DIR:OUT;SFP:1101;SCL:1;SRVR:DB6PR0802MB2165;H:DB6PR0802MB2133.eurprd08.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1;
received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts)
x-microsoft-antispam-message-info: gC2VpnWziRFAqIQZJS16+UbNk2+lruuB8gTX9KOpRvuewsdSwIafsCVYO5kU1gevY5YKaC341gkpl1o9TgL+a4wxh+EHuluCI5rxK1Qoozjash1wtK2j5quvVQGRtMQ/g2U7gq0J7hV9V6mVI7fX1nIFDtaJZUSiNGWIOGfN12QmLz1saeGWajgN9G2LvUPS
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="utf-8"
Content-ID: <EEB6F7DCE6237349A62EB8323AB59BE5@eurprd08.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-MS-Office365-Filtering-Correlation-Id: 254aa4f1-0a3a-447f-cd74-08d5ca1f26b6
X-OriginatorOrg: arm.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 254aa4f1-0a3a-447f-cd74-08d5ca1f26b6
X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jun 2018 13:29:08.3863 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0802MB2165
X-IsSubscribed: yes
X-SW-Source: 2018-06/txt/msg00060.txt.bz2
Content-length: 18317
VXBkYXRlIG9mIHBhdGNoIHBvc3RlZCBiZWxvdy4NCg0KDQo+IE9uIDMxIE1h
eSAyMDE4LCBhdCAxNTo1NywgUGVkcm8gQWx2ZXMgPHBhbHZlc0ByZWRoYXQu
Y29tPiB3cm90ZToNCj4gDQo+IE9uIDA1LzExLzIwMTggMTE6NTIgQU0sIEFs
YW4gSGF5d2FyZCB3cm90ZToNCj4gDQo+PiArLyogUmV0dXJuIHRoZSB0eXBl
IGZvciBhbiBBZHZTSVNEIFYgcmVnaXN0ZXIuICAqLw0KPj4gKw0KPj4gK3N0
YXRpYyBzdHJ1Y3QgdHlwZSAqDQo+PiArYWFyY2g2NF92bnZfdHlwZSAoc3Ry
dWN0IGdkYmFyY2ggKmdkYmFyY2gpDQo+PiArew0KPj4gKyAgc3RydWN0IGdk
YmFyY2hfdGRlcCAqdG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Fj
aGUsDQorCQkJCSAgIHJlZ251bSAtIEFBUkNINjRfSDBfUkVHTlVNLCBIX1JF
R0lTVEVSX1NJWkUsDQorCQkJCSAgIGJ1Zik7DQoNCiAgIGlmIChyZWdudW0g
Pj0gQUFSQ0g2NF9CMF9SRUdOVU0gJiYgcmVnbnVtIDwgQUFSQ0g2NF9CMF9S
RUdOVU0gKyAzMikNCi0gICAgcmV0dXJuIGFhcmNoNjRfcHNldWRvX3dyaXRl
XzEgKHJlZ2NhY2hlLCByZWdudW0gLSBBQVJDSDY0X0IwX1JFR05VTSwNCi0J
CQkJICAgQl9SRUdJU1RFUl9TSVpFLCBidWYpOw0KKyAgICByZXR1cm4gYWFy
Y2g2NF9wc2V1ZG9fd3JpdGVfMSAoZ2RiYXJjaCwgcmVnY2FjaGUsDQorCQkJ
CSAgIHJlZ251bSAtIEFBUkNINjRfQjBfUkVHTlVNLCBCX1JFR0lTVEVSX1NJ
WkUsDQorCQkJCSAgIGJ1Zik7DQorDQorICBpZiAodGRlcC0+aGFzX3N2ZSAo
KSAmJiByZWdudW0gPj0gQUFSQ0g2NF9TVkVfVjBfUkVHTlVNDQorICAgICAg
JiYgcmVnbnVtIDwgQUFSQ0g2NF9TVkVfVjBfUkVHTlVNICsgMzIpDQorICAg
IHJldHVybiBhYXJjaDY0X3BzZXVkb193cml0ZV8xIChnZGJhcmNoLCByZWdj
YWNoZSwNCisJCQkJICAgcmVnbnVtIC0gQUFSQ0g2NF9TVkVfVjBfUkVHTlVN
LA0KKwkJCQkgICBWX1JFR0lTVEVSX1NJWkUsIGJ1Zik7DQoNCiAgIGdkYl9h
c3NlcnRfbm90X3JlYWNoZWQgKCJyZWdudW0gb3V0IG9mIGJvdW5kIik7DQog
fQ0KDQoNCg0KDQoFrom gdb-patches-return-147918-listarch-gdb-patches=sources.redhat.com@sourceware.org Mon Jun 04 13:31:02 2018
Return-Path: <gdb-patches-return-147918-listarch-gdb-patches=sources.redhat.com@sourceware.org>
Delivered-To: listarch-gdb-patches@sources.redhat.com
Received: (qmail 104160 invoked by alias); 4 Jun 2018 13:31:00 -0000
Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm
Precedence: bulk
List-Id: <gdb-patches.sourceware.org>
List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org>
List-Archive: <http://sourceware.org/ml/gdb-patches/>
List-Post: <mailto:gdb-patches@sourceware.org>
List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs>
Sender: gdb-patches-owner@sourceware.org
Delivered-To: mailing list gdb-patches@sourceware.org
Received: (qmail 103938 invoked by uid 89); 4 Jun 2018 13:30:49 -0000
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=HX-Google-Smtp-Source:ADUXVKK, H*i:sk:dLjk5Wk, H*i:CAMe9rOor6x, H*f:CAMe9rOor6x
X-Spam-User: qpsmtpd, 2 recipients
X-HELO: mail-ot0-f194.google.com
Received: from mail-ot0-f194.google.com (HELO mail-ot0-f194.google.com) (74.125.82.194) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 04 Jun 2018 13:30:43 +0000
Received: by mail-ot0-f194.google.com with SMTP id l12-v6so37628053oth.6; Mon, 04 Jun 2018 06:30:32 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d\x1e100.net; s 161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=XL/ez/5Rxbsw2ryq0aDeFqi34nYYxAH1QodfGuvs5+w=; bÖDobiYG6mXcg0kLjn1jBU5LXZ12ZsgLAiZfFG9D2Af7a201eLO1CADgJ4hCvGp/ex u9UusIcaYLaunG+4sdKPCl+XXJ/jzdn9R9Aqb3gPaX5TCOvqVOVX+jvxR7doPJZKiXpC is92jrNujyfNIMUBMN7yZ4mCH+98tCaqFKwZJqfM9uUe7aS0hDTdRP0aSHY6MEKZ2kbz Je0ADUogHNkVxNGwjKbtxAGDjM2RZ9La1Mk63qlftK9Fx76E1KkWEANsHupQPuenVprD Pvt5CbJWpSxwYN4p2vUzy1ZYavRxN9NEsyIVB7F4xsDNXFqOkb8AwWEu5EGfx5BaNelu jfxA=X-Gm-Message-State: ALKqPwep03b4o5v5T/Er4g8j4VF08tss1uNICQH+wK22f9qAq9T6RZAX KA2fo7zYkCPR9lmhS6OATO1xawsA6TxZBR/E4HsX-Google-Smtp-Source: ADUXVKK+pfRgfPtk1TYJA9ARAwvQRxFq+dE5KcOYK8kdww/zb6sGVJisNJtfgwH8BfUV8VNblGw0l2u/FPcXr5WYFZgX-Received: by 2002:a9d:11ab:: with SMTP id v40-v6mr12397799otf.125.1528119030806; Mon, 04 Jun 2018 06:30:30 -0700 (PDT)
MIME-Version: 1.0
Received: by 2002:a4a:7019:0:0:0:0:0 with HTTP; Mon, 4 Jun 2018 06:30:30 -0700 (PDT)
In-Reply-To: <CAMe9rOor6x+dLjk5Wk76oscEPs_DK2-K1k9dqUnCLNqFqndznQ@mail.gmail.com>
References: <20180521121557.16535-1-hjl.tools@gmail.com> <20180521121557.16535-2-hjl.tools@gmail.com> <cde62c28-7b85-41dc-a14c-bde8d677f06e@redhat.com> <20180601101949.GA7660@bubble.grove.modra.org> <CAMe9rOrgvsqiCOWy4jrC5h4PjPwJS36=h6pB1ri5mngd9ENkLw@mail.gmail.com> <0d2578f3-f6c0-d19f-d036-fd07d1ff03d0@redhat.com> <2478bdec-0e72-ac94-aa97-8004999feb6e@redhat.com> <CAMe9rOor6x+dLjk5Wk76oscEPs_DK2-K1k9dqUnCLNqFqndznQ@mail.gmail.com>
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Mon, 04 Jun 2018 13:31:00 -0000
Message-ID: <CAMe9rOox6mZ6MX=GyC7-XJ2GuDzc5cjrLDyc3Hei5gBR4fWw7w@mail.gmail.com>
Subject: Re: [PATCH 2/3] Add DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION
To: Pedro Alves <palves@redhat.com>, John Marshall <John.W.Marshall@glasgow.ac.uk>
Cc: Nick Clifton <nickc@redhat.com>, Alan Modra <amodra@gmail.com>, Binutils <binutils@sourceware.org>, GDB <gdb-patches@sourceware.org>
Content-Type: text/plain; charset="UTF-8"
X-IsSubscribed: yes
X-SW-Source: 2018-06/txt/msg00061.txt.bz2
Content-length: 1318
On Mon, Jun 4, 2018 at 5:46 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Mon, Jun 4, 2018 at 5:19 AM, Pedro Alves <palves@redhat.com> wrote:
>> On 06/04/2018 01:13 PM, Nick Clifton wrote:
>>> Hi H.J.
>>>
>>>> +# if __GNUC__ == 8 && __GNUC_MINOR__ < 2
>>>> +# define DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION \
>>>> + DIAGNOSTIC_IGNORE ("-Wstringop-truncation")
>>>> +# endif
>>>>
>>>> OK for master?
>>>
>>> Approved - please apply.
>>
>> Please don't. This is again going against the intention of
>> the header. The GCC version checks should be put in the
>> places where the warning needs to be suppressed.
>> The current patch makes all current and future uses of
>> DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION only apply to
>> GCC 8.1. That is incorrect. Consider what you will
>> have to do to suppress some -Wstrinop-truncation warning
>> with DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION on GCC 8.2 or
>> GCC 9 or whatever.
>
> This is what my original patch intended to do. But diagnostics.h from
> GDB doesn't support GCC version. Should I extend it to match glibc?
>
>> Also, you can use GCC_VERSION to make the version check
>> a little simpler.
>>
>> Thanks,
>> Pedro Alves
My second patch is needed for Darwin. I will check it in as is
and update it with a follow up patch to support GCC version.
--
H.J.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 1/3] Move gdb/common/diagnostics.h to include/diagnostics.h
2018-06-04 13:12 ` H.J. Lu
2018-06-04 13:24 ` John Marshall
@ 2018-06-04 13:35 ` Pedro Alves
2018-06-04 13:37 ` H.J. Lu
1 sibling, 1 reply; 20+ messages in thread
From: Pedro Alves @ 2018-06-04 13:35 UTC (permalink / raw)
To: H.J. Lu, John Marshall; +Cc: binutils, gdb-patches
On 06/04/2018 02:12 PM, H.J. Lu wrote:
> On Mon, Jun 4, 2018 at 3:51 AM, John Marshall
> <John.W.Marshall@glasgow.ac.uk> wrote:
>> On 21 May 2018, at 13:15, H dot J dot Lu <hjl dot tools at gmail dot com> wrote:
>>> Move gdb/common/diagnostics.h to include/diagnostics.h so that it can
>>> be used in binutils.
>>
>> This patch broke building gdb on MacOS with clang (i.e., after ./configure with no options):
>>
>> CXX gdb.o
>> In file included from ../../../binutils-gdb/gdb/gdb.c:19:
>> In file included from ../../../binutils-gdb/gdb/defs.h:531:
>> In file included from ../../../binutils-gdb/gdb/gdbarch.h:39:
>> In file included from ../../../binutils-gdb/gdb/frame.h:72:
>> In file included from ../../../binutils-gdb/gdb/language.h:26:
>> ../../../binutils-gdb/gdb/symtab.h:1361:1: error: _Pragma takes a parenthesized string literal
>> DEF_VEC_P (symtab_ptr);
I think clang is printing a bogus location here. symtab.h includes
vec.h, which includes diagnostics.h and does:
/* clang has a bug that makes it warn (-Wunused-function) about unused functions
that are the result of the DEF_VEC_* macro expansion. See:
https://bugs.llvm.org/show_bug.cgi?id=22712
We specifically ignore this warning for the vec functions when the compiler
is clang. */
#ifdef __clang__
# define DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION \
DIAGNOSTIC_IGNORE_UNUSED_FUNCTION
#else
# define DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION
#endif
and that's most certainly what is tripping on the _Pragma+STRINGIFY.
>>
>>> --- a/gdb/common/diagnostics.h
>>> +++ b/include/diagnostics.h
>>> [snip]
>>> @@ -15,10 +13,8 @@
>>> You should have received a copy of the GNU General Public License
>>> along with this program. If not, see <http://www.gnu.org/licenses/>. */
>>>
>>> -#ifndef COMMON_DIAGNOSTICS_H
>>> -#define COMMON_DIAGNOSTICS_H
>>> -
>>> -#include "common/preprocessor.h"
>>
>> Putting this #include back fixes the build. Apparently in this configuration, include/diagnostics.h doesn't otherwise have a definition of STRINGIFY whereas on Linux or other platforms it does, via some coincidence of different host-related includes or something.
>
> Please add
>
> #include "common/preprocessor.h"
>
> to gdb.c.
>
I don't think so, see above.
Where does binutils get the definition of STRINGIFY from?
Your other patch does:
> --- a/include/diagnostics.h
> +++ b/include/diagnostics.h
> @@ -19,8 +19,13 @@
> #ifdef __GNUC__
> # define DIAGNOSTIC_PUSH _Pragma ("GCC diagnostic push")
> # define DIAGNOSTIC_POP _Pragma ("GCC diagnostic pop")
> +
> +/* Stringification. */
> +# define DIAGNOSTIC_STRINGIFY_1(x) #x
> +# define DIAGNOSTIC_STRINGIFY(x) DIAGNOSTIC_STRINGIFY_1 (x)
> +
> # define DIAGNOSTIC_IGNORE(option) \
> - _Pragma (STRINGIFY (GCC diagnostic ignored option))
> + _Pragma (DIAGNOSTIC_STRINGIFY (GCC diagnostic ignored option))
> #else
So I'm surprised by your suggestion. That DIAGNOSTIC_STRINGIFY
bit should be split out of that other patch and pushed in
separately, IMO. Alternatively, preprocessor.h should be shared too.
Thanks,
Pedro Alves
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 1/3] Move gdb/common/diagnostics.h to include/diagnostics.h
2018-06-04 13:35 ` Pedro Alves
@ 2018-06-04 13:37 ` H.J. Lu
0 siblings, 0 replies; 20+ messages in thread
From: H.J. Lu @ 2018-06-04 13:37 UTC (permalink / raw)
To: Pedro Alves; +Cc: John Marshall, binutils, gdb-patches
On Mon, Jun 4, 2018 at 6:35 AM, Pedro Alves <palves@redhat.com> wrote:
> On 06/04/2018 02:12 PM, H.J. Lu wrote:
>> On Mon, Jun 4, 2018 at 3:51 AM, John Marshall
>> <John.W.Marshall@glasgow.ac.uk> wrote:
>>> On 21 May 2018, at 13:15, H dot J dot Lu <hjl dot tools at gmail dot com> wrote:
>>>> Move gdb/common/diagnostics.h to include/diagnostics.h so that it can
>>>> be used in binutils.
>>>
>>> This patch broke building gdb on MacOS with clang (i.e., after ./configure with no options):
>>>
>>> CXX gdb.o
>>> In file included from ../../../binutils-gdb/gdb/gdb.c:19:
>>> In file included from ../../../binutils-gdb/gdb/defs.h:531:
>>> In file included from ../../../binutils-gdb/gdb/gdbarch.h:39:
>>> In file included from ../../../binutils-gdb/gdb/frame.h:72:
>>> In file included from ../../../binutils-gdb/gdb/language.h:26:
>>> ../../../binutils-gdb/gdb/symtab.h:1361:1: error: _Pragma takes a parenthesized string literal
>>> DEF_VEC_P (symtab_ptr);
>
> I think clang is printing a bogus location here. symtab.h includes
> vec.h, which includes diagnostics.h and does:
>
> /* clang has a bug that makes it warn (-Wunused-function) about unused functions
> that are the result of the DEF_VEC_* macro expansion. See:
>
> https://bugs.llvm.org/show_bug.cgi?id=22712
>
> We specifically ignore this warning for the vec functions when the compiler
> is clang. */
> #ifdef __clang__
> # define DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION \
> DIAGNOSTIC_IGNORE_UNUSED_FUNCTION
> #else
> # define DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION
> #endif
>
> and that's most certainly what is tripping on the _Pragma+STRINGIFY.
>
>>>
>>>> --- a/gdb/common/diagnostics.h
>>>> +++ b/include/diagnostics.h
>>>> [snip]
>>>> @@ -15,10 +13,8 @@
>>>> You should have received a copy of the GNU General Public License
>>>> along with this program. If not, see <http://www.gnu.org/licenses/>. */
>>>>
>>>> -#ifndef COMMON_DIAGNOSTICS_H
>>>> -#define COMMON_DIAGNOSTICS_H
>>>> -
>>>> -#include "common/preprocessor.h"
>>>
>>> Putting this #include back fixes the build. Apparently in this configuration, include/diagnostics.h doesn't otherwise have a definition of STRINGIFY whereas on Linux or other platforms it does, via some coincidence of different host-related includes or something.
>>
>> Please add
>>
>> #include "common/preprocessor.h"
>>
>> to gdb.c.
>>
>
> I don't think so, see above.
>
> Where does binutils get the definition of STRINGIFY from?
>
> Your other patch does:
>
>> --- a/include/diagnostics.h
>> +++ b/include/diagnostics.h
>> @@ -19,8 +19,13 @@
>> #ifdef __GNUC__
>> # define DIAGNOSTIC_PUSH _Pragma ("GCC diagnostic push")
>> # define DIAGNOSTIC_POP _Pragma ("GCC diagnostic pop")
>> +
>> +/* Stringification. */
>> +# define DIAGNOSTIC_STRINGIFY_1(x) #x
>> +# define DIAGNOSTIC_STRINGIFY(x) DIAGNOSTIC_STRINGIFY_1 (x)
>> +
>> # define DIAGNOSTIC_IGNORE(option) \
>> - _Pragma (STRINGIFY (GCC diagnostic ignored option))
>> + _Pragma (DIAGNOSTIC_STRINGIFY (GCC diagnostic ignored option))
>> #else
>
> So I'm surprised by your suggestion. That DIAGNOSTIC_STRINGIFY
> bit should be split out of that other patch and pushed in
> separately, IMO. Alternatively, preprocessor.h should be shared too.
>
I pushed my second patch and will submit a follow up patch to address
your concern on GCC version.
--
H.J.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 2/3] Add DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION
[not found] ` <CAMe9rOox6mZ6MX=GyC7-XJ2GuDzc5cjrLDyc3Hei5gBR4fWw7w@mail.gmail.com>
@ 2018-06-04 13:40 ` Pedro Alves
0 siblings, 0 replies; 20+ messages in thread
From: Pedro Alves @ 2018-06-04 13:40 UTC (permalink / raw)
To: H.J. Lu, John Marshall; +Cc: Nick Clifton, Alan Modra, Binutils, GDB
On 06/04/2018 02:30 PM, H.J. Lu wrote:
> On Mon, Jun 4, 2018 at 5:46 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> On Mon, Jun 4, 2018 at 5:19 AM, Pedro Alves <palves@redhat.com> wrote:
>>> On 06/04/2018 01:13 PM, Nick Clifton wrote:
>>>> Hi H.J.
>>>>
>>>>> +# if __GNUC__ == 8 && __GNUC_MINOR__ < 2
>>>>> +# define DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION \
>>>>> + DIAGNOSTIC_IGNORE ("-Wstringop-truncation")
>>>>> +# endif
>>>>>
>>>>> OK for master?
>>>>
>>>> Approved - please apply.
>>>
>>> Please don't. This is again going against the intention of
>>> the header. The GCC version checks should be put in the
>>> places where the warning needs to be suppressed.
>>> The current patch makes all current and future uses of
>>> DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION only apply to
>>> GCC 8.1. That is incorrect. Consider what you will
>>> have to do to suppress some -Wstrinop-truncation warning
>>> with DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION on GCC 8.2 or
>>> GCC 9 or whatever.
>>
>> This is what my original patch intended to do. But diagnostics.h from
>> GDB doesn't support GCC version. Should I extend it to match glibc?
>>
>>> Also, you can use GCC_VERSION to make the version check
>>> a little simpler.
>
> My second patch is needed for Darwin. I will check it in as is
> and update it with a follow up patch to support GCC version.
For the record, I think it would have been better procedure
to split and push the DIAGNOSTIC_STRINGIFY bit only [1], while
giving people reasonable time to respond to the rest.
https://sourceware.org/ml/gdb-patches/2018-06/msg00062.html
Thanks,
Pedro Alves
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 2/3] Add DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION
2018-06-04 12:46 ` H.J. Lu
[not found] ` <CAMe9rOox6mZ6MX=GyC7-XJ2GuDzc5cjrLDyc3Hei5gBR4fWw7w@mail.gmail.com>
@ 2018-06-04 14:04 ` Pedro Alves
1 sibling, 0 replies; 20+ messages in thread
From: Pedro Alves @ 2018-06-04 14:04 UTC (permalink / raw)
To: H.J. Lu; +Cc: Nick Clifton, Alan Modra, Binutils, GDB
On 06/04/2018 01:46 PM, H.J. Lu wrote:
> On Mon, Jun 4, 2018 at 5:19 AM, Pedro Alves <palves@redhat.com> wrote:
>> On 06/04/2018 01:13 PM, Nick Clifton wrote:
>>> Hi H.J.
>>>
>>>> +# if __GNUC__ == 8 && __GNUC_MINOR__ < 2
>>>> +# define DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION \
>>>> + DIAGNOSTIC_IGNORE ("-Wstringop-truncation")
>>>> +# endif
>>>>
>>>> OK for master?
>>>
>>> Approved - please apply.
>>
>> Please don't. This is again going against the intention of
>> the header. The GCC version checks should be put in the
>> places where the warning needs to be suppressed.
>> The current patch makes all current and future uses of
>> DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION only apply to
>> GCC 8.1. That is incorrect. Consider what you will
>> have to do to suppress some -Wstrinop-truncation warning
>> with DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION on GCC 8.2 or
>> GCC 9 or whatever.
>
> This is what my original patch intended to do. But diagnostics.h from
> GDB doesn't support GCC version. > Should I extend it to match glibc?
diagnostics.h doesn't support a GCC version parameter on purpose, as I
explained before. A single GCC version argument like glibc does
only works for GCC, and is in fact not used by the macro at all,
it is only there for conveniently grepping. It's a nop argument:
#define DIAG_IGNORE_NEEDS_COMMENT(version, option) \
_Pragma (_DIAG_STR (GCC diagnostic ignored option))
I've detailed more here on why I don't think that's right:
https://sourceware.org/ml/binutils/2018-05/msg00191.html
We mainly want to use DIAGNOSTIC_IGNORE_XXX to disable warnings
around code that even though is seemingly smelly, is actually
what we want to write. See these examples:
https://sourceware.org/ml/gdb-patches/2017-06/msg00622.html
https://sourceware.org/ml/gdb-patches/2017-12/msg00529.html
The case in question is a little different, as the warning is
a false positive in these particular spots. So I think we should
disable it in these particular spots, only. I.e., I think a version
check in the client side (like your original patch, IIRC, though
implemented differently) is appropriate, like:
+ 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 + 44, va_arg (ap, const char *), 80);
+ DIAGNOSTIC_POP;
It would be fine with me to add the GCC version check to diagnostics.h,
if, when you consider what to do when you need to disable
-Wstringop-truncation in some future GCC version, in some
other spot in the code, you decide that if that happens,
it's OK to disable -Wstringop-truncation everywhere
DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION is used at that point
in time, even if the current spots that use
DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION won't trigger false positive
with the newer GCC version that is forcing you to change the
version check. That seems to go counter to the expressed desire
to only disable -Wstringop-truncation in these spots with 8.1
but not 8.2, though. That's a design conflict.
>> Also, you can use GCC_VERSION to make the version check
>> a little simpler.
Thanks,
Pedro Alves
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 3/3] Use DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION to silence GCC 8
2018-06-01 7:59 ` Nick Clifton
@ 2018-06-04 16:58 ` H.J. Lu
2018-06-04 17:06 ` Pedro Alves
2018-07-02 16:25 ` Tulio Magno Quites Machado Filho
0 siblings, 2 replies; 20+ messages in thread
From: H.J. Lu @ 2018-06-04 16:58 UTC (permalink / raw)
To: Nick Clifton, Pedro Alves; +Cc: Binutils, GDB
[-- Attachment #1: Type: text/plain, Size: 800 bytes --]
On Fri, Jun 1, 2018 at 12:59 AM, Nick Clifton <nickc@redhat.com> wrote:
> Hi H.J.
>
>> 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 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.
>
> Approved - please apply.
>
This is the patch I am checking in.
--
H.J.
[-- Attachment #2: 0001-Use-DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION-to-silence.patch --]
[-- Type: text/x-patch, Size: 6792 bytes --]
From 30a2bf66aa5b1a22ea14cbc5eb10d12cae5657c1 Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Mon, 4 Jun 2018 09:48:28 -0700
Subject: [PATCH] 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.
---
bfd/bfd-in.h | 1 +
bfd/bfd-in2.h | 1 +
bfd/elf32-arm.c | 9 +++++++++
bfd/elf32-ppc.c | 9 +++++++++
bfd/elf32-s390.c | 9 +++++++++
bfd/elf64-ppc.c | 9 +++++++++
bfd/elf64-s390.c | 9 +++++++++
bfd/elfxx-aarch64.c | 9 +++++++++
include/diagnostics.h | 4 +---
9 files changed, 57 insertions(+), 3 deletions(-)
diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h
index 481587e458..1d477c3f5f 100644
--- a/bfd/bfd-in.h
+++ b/bfd/bfd-in.h
@@ -34,6 +34,7 @@ extern "C" {
#include "ansidecl.h"
#include "symcat.h"
+#include "diagnostics.h"
#include <stdarg.h>
#include <sys/stat.h>
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index ef62f31953..65735f026e 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -41,6 +41,7 @@ extern "C" {
#include "ansidecl.h"
#include "symcat.h"
+#include "diagnostics.h"
#include <stdarg.h>
#include <sys/stat.h>
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index dbfd838fbe..870111b5ed 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -2174,7 +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);
+ 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 + 44, va_arg (ap, const char *), 80);
+ DIAGNOSTIC_POP;
va_end (ap);
return elfcore_write_note (abfd, buf, bufsiz,
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 3482baca20..ea8dbed981 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -2411,7 +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);
+ 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 + 48, va_arg (ap, const char *), 80);
+ DIAGNOSTIC_POP;
va_end (ap);
return elfcore_write_note (abfd, buf, bufsiz,
"CORE", note_type, data, sizeof (data));
diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c
index 99ceb76d3d..ebda1dacdc 100644
--- a/bfd/elf32-s390.c
+++ b/bfd/elf32-s390.c
@@ -3951,7 +3951,16 @@ elf_s390_write_core_note (bfd *abfd, char *buf, int *bufsiz,
va_end (ap);
strncpy (data + 28, fname, 16);
+ 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 + 44, psargs, 80);
+ DIAGNOSTIC_POP;
return elfcore_write_note (abfd, buf, bufsiz, "CORE", note_type,
&data, sizeof (data));
}
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index f543cb0288..16199fbe3e 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -3041,7 +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);
+ 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, va_arg (ap, const char *), 80);
+ DIAGNOSTIC_POP;
va_end (ap);
return elfcore_write_note (abfd, buf, bufsiz,
"CORE", note_type, data, sizeof (data));
diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c
index 612557fa74..93a3c7c22a 100644
--- a/bfd/elf64-s390.c
+++ b/bfd/elf64-s390.c
@@ -3760,7 +3760,16 @@ elf_s390_write_core_note (bfd *abfd, char *buf, int *bufsiz,
va_end (ap);
strncpy (data + 40, fname, 16);
+ 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);
+ DIAGNOSTIC_POP;
return elfcore_write_note (abfd, buf, bufsiz, "CORE", note_type,
&data, sizeof (data));
}
diff --git a/bfd/elfxx-aarch64.c b/bfd/elfxx-aarch64.c
index af37f828d5..3ea8dadf6d 100644
--- a/bfd/elfxx-aarch64.c
+++ b/bfd/elfxx-aarch64.c
@@ -640,7 +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);
+ 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, va_arg (ap, const char *), 80);
+ DIAGNOSTIC_POP;
va_end (ap);
return elfcore_write_note (abfd, buf, bufsiz, "CORE",
diff --git a/include/diagnostics.h b/include/diagnostics.h
index f7412d4a38..4a674106dc 100644
--- a/include/diagnostics.h
+++ b/include/diagnostics.h
@@ -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
--
2.17.1
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 3/3] Use DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION to silence GCC 8
2018-06-04 16:58 ` H.J. Lu
@ 2018-06-04 17:06 ` Pedro Alves
2018-07-02 16:25 ` Tulio Magno Quites Machado Filho
1 sibling, 0 replies; 20+ messages in thread
From: Pedro Alves @ 2018-06-04 17:06 UTC (permalink / raw)
To: H.J. Lu, Nick Clifton; +Cc: Binutils, GDB
On 06/04/2018 05:58 PM, H.J. Lu wrote:
> This is the patch I am checking in.
Great, thank you!
Pedro Alves
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 3/3] Use DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION to silence GCC 8
2018-06-04 16:58 ` H.J. Lu
2018-06-04 17:06 ` Pedro Alves
@ 2018-07-02 16:25 ` Tulio Magno Quites Machado Filho
1 sibling, 0 replies; 20+ messages in thread
From: Tulio Magno Quites Machado Filho @ 2018-07-02 16:25 UTC (permalink / raw)
To: H.J. Lu, Nick Clifton, Pedro Alves; +Cc: Binutils, GDB
"H.J. Lu" <hjl.tools@gmail.com> writes:
> 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.
bfd.h is an installed header, while diagnostics.h is not, causing build
failures on software that include bfd.h, e.g.:
In file included from opagent.c:65:
bfd.h:44:10: fatal error: diagnostics.h: No such file or directory
#include "diagnostics.h"
^~~~~~~~~~~~~~~
--
Tulio Magno
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2018-07-02 16:25 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-21 12:16 [PATCH 1/3] Move gdb/common/diagnostics.h to include/diagnostics.h H.J. Lu
2018-05-21 13:10 ` [PATCH 2/3] Add DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION H.J. Lu
2018-06-01 7:57 ` Nick Clifton
[not found] ` <20180601101949.GA7660@bubble.grove.modra.org>
2018-06-01 16:51 ` H.J. Lu
2018-06-04 12:13 ` Nick Clifton
2018-06-04 12:19 ` Pedro Alves
2018-06-04 12:46 ` H.J. Lu
[not found] ` <CAMe9rOox6mZ6MX=GyC7-XJ2GuDzc5cjrLDyc3Hei5gBR4fWw7w@mail.gmail.com>
2018-06-04 13:40 ` Pedro Alves
2018-06-04 14:04 ` Pedro Alves
2018-05-21 13:12 ` [PATCH 3/3] Use DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION to silence GCC 8 H.J. Lu
2018-06-01 7:59 ` Nick Clifton
2018-06-04 16:58 ` H.J. Lu
2018-06-04 17:06 ` Pedro Alves
2018-07-02 16:25 ` Tulio Magno Quites Machado Filho
2018-05-21 14:12 ` [PATCH 1/3] Move gdb/common/diagnostics.h to include/diagnostics.h Simon Marchi
2018-06-01 7:49 ` Nick Clifton
[not found] ` <B781F464-751E-4D45-8881-36F6003759BE@glasgow.ac.uk>
2018-06-04 13:12 ` H.J. Lu
2018-06-04 13:24 ` John Marshall
2018-06-04 13:35 ` Pedro Alves
2018-06-04 13:37 ` H.J. Lu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox