* [pushed] Remove struct keyword in range-based for loop
@ 2018-07-14 2:09 Simon Marchi
0 siblings, 0 replies; only message in thread
From: Simon Marchi @ 2018-07-14 2:09 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
Fix this with gcc 6.3.0:
/home/simark/src/binutils-gdb/gdb/symfile.c: In function 'void set_objfile_default_section_offset(objfile*, const section_addr_info&, CORE_ADDR)':
/home/simark/src/binutils-gdb/gdb/symfile.c:2114:14: error: types may not be defined in a for-range-declaration [-Werror]
for (const struct other_sections *objf_sect : objf_addrs_sorted)
^~~~~~
gdb/ChangeLog:
* symfile.c (set_objfile_default_section_offset): Remove struct
keyword.
---
gdb/ChangeLog | 5 +++++
gdb/symfile.c | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d4b0eb1d3e63..ba4eba73fb54 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * symfile.c (set_objfile_default_section_offset): Remove struct
+ keyword.
+
2018-07-14 Stafford Horne <shorne@gmail.com>
* (Responsible Maintainers): Add myself as or1k maintainer.
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 62b38bd61825..3614aa3f9555 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -2111,7 +2111,7 @@ set_objfile_default_section_offset (struct objfile *objf,
std::vector<const struct other_sections *>::iterator addrs_sorted_iter
= addrs_sorted.begin ();
- for (const struct other_sections *objf_sect : objf_addrs_sorted)
+ for (const other_sections *objf_sect : objf_addrs_sorted)
{
const char *objf_name = addr_section_name (objf_sect->name.c_str ());
int cmp = -1;
--
2.18.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-07-14 2:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-14 2:09 [pushed] Remove struct keyword in range-based for loop Simon Marchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).