mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-15 04:31:49 +08:00
Fix build with g++ 6.3.1
With g++ 6.3.1: target-descriptions.c: In member function ‘virtual void print_c_tdesc::visit_pre(const target_desc*)’: target-descriptions.c:1836:16: error: types may not be defined in a for-range-declaration [-Werror] for (const struct bfd_arch_info *compatible : e->compatible) ^~~~~~ I think at some point the forward declaration of this struct had been removed and declared as a typedef. This fixes that. gdb/ChangeLog: 2017-12-07 Adam Stylinski <adam.stylinski@etegent.com> PR c++/21222 * target-descriptions.c (print_c_tdesc::visit_pre): Change type of range-for variable.
This commit is contained in:
parent
a880623024
commit
23a8d1862b
@ -1,3 +1,9 @@
|
||||
2017-12-07 Adam Stylinski <adam.stylinski@etegent.com>
|
||||
|
||||
PR c++/21222
|
||||
* target-descriptions.c (print_c_tdesc::visit_pre): Change type of
|
||||
range-for variable.
|
||||
|
||||
2017-12-07 Simon Marchi <simon.marchi@ericsson.com>
|
||||
|
||||
* common/selftest.h (struct selftest): Add virtual destructor.
|
||||
|
@ -1833,7 +1833,7 @@ class print_c_tdesc : public tdesc_element_visitor
|
||||
printf_unfiltered ("\n");
|
||||
}
|
||||
|
||||
for (const struct bfd_arch_info *compatible : e->compatible)
|
||||
for (const bfd_arch_info_type *compatible : e->compatible)
|
||||
printf_unfiltered
|
||||
(" tdesc_add_compatible (result, bfd_scan_arch (\"%s\"));\n",
|
||||
compatible->printable_name);
|
||||
|
Loading…
Reference in New Issue
Block a user