This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] gdb: Fix build failure with GCC 7
- From: H.J.Lu <hjl at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 9 Aug 2017 12:03:51 -0000
- Subject: [binutils-gdb] gdb: Fix build failure with GCC 7
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b33404388e5bbd8a1fddfde73cd4593ae2b557e8
commit b33404388e5bbd8a1fddfde73cd4593ae2b557e8
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Aug 9 05:01:55 2017 -0700
gdb: Fix build failure with GCC 7
Fix:
/export/gnu/import/git/sources/binutils-gdb/gdb/dwarf2read.c: In function â??const char* dwarf2_string_attr(die_info*, unsigned int, dwarf2_cu*)â??:
/export/gnu/import/git/sources/binutils-gdb/gdb/dwarf2read.c:17626:39: error: enum constant in boolean context [-Werror=int-in-bool-context]
|| attr->form == DW_FORM_string || DW_FORM_GNU_str_index
* dwarf2read.c (dwarf2_string_attr): Fix a typo.
Diff:
---
gdb/ChangeLog | 4 ++++
gdb/dwarf2read.c | 3 ++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 209d0b6..19d6c1b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
+
+ * dwarf2read.c (dwarf2_string_attr): Fix a typo.
+
2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
Yao Qi <yao.qi@linaro.org>
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 2a527e8..4f2fdce 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -17623,7 +17623,8 @@ dwarf2_string_attr (struct die_info *die, unsigned int name, struct dwarf2_cu *c
if (attr != NULL)
{
if (attr->form == DW_FORM_strp || attr->form == DW_FORM_line_strp
- || attr->form == DW_FORM_string || DW_FORM_GNU_str_index
+ || attr->form == DW_FORM_string
+ || attr->form == DW_FORM_GNU_str_index
|| attr->form == DW_FORM_GNU_strp_alt)
str = DW_STRING (attr);
else