From ff27d0737ef0c9433a6a7c83c1e678ac57a27699 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Fri, 13 Jul 2018 22:06:34 -0400 Subject: Remove struct keyword in range-based for loop 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/symfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/symfile.c') diff --git a/gdb/symfile.c b/gdb/symfile.c index 62b38bd..3614aa3 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -2111,7 +2111,7 @@ set_objfile_default_section_offset (struct objfile *objf, std::vector::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; -- cgit v1.1