diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2018-05-29 20:13:04 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2018-05-29 20:13:06 -0400 |
commit | 5294170687db7d997a00f88b765ef353121aa441 (patch) | |
tree | dbfdd1cda4556ed4af904c4b6e9478c1889b6e0f /gdb/dwarf2read.c | |
parent | 51af6fa066ee6e4ce0ef203678b3281d71f29cbb (diff) | |
download | gdb-5294170687db7d997a00f88b765ef353121aa441.zip gdb-5294170687db7d997a00f88b765ef353121aa441.tar.gz gdb-5294170687db7d997a00f88b765ef353121aa441.tar.bz2 |
Remove "struct" keyword in range-based for loops
I get this kind of errors with GCC 6.3.0:
/home/simark/src/binutils-gdb/gdb/breakpoint.c: In function 'void print_solib_event(int)':
/home/simark/src/binutils-gdb/gdb/breakpoint.c:4618:12: error: types may not be defined in a for-range-declaration [-Werror]
for (struct so_list *iter : current_program_space->added_solibs)
^~~~~~
Removing the struct keyword makes it happy.
gdb/ChangeLog:
* breakpoint.c (print_solib_event, check_status_catch_solib):
Remove struct keyword in range-based for loops.
* dbxread.c (find_corresponding_bincl_psymtab): Likewise.
* dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
Likewise.
* linespec.c (find_superclass_methods, search_minsyms_for_name):
Likewise.
* symfile.c (addr_info_make_relative): Likewise.
* thread.c (value_in_thread_stack_temporaries): Likewise.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r-- | gdb/dwarf2read.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 834bce7..d5b890b 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -9667,7 +9667,7 @@ compute_delayed_physnames (struct dwarf2_cu *cu) return; gdb_assert (cu->language == language_cplus); - for (struct delayed_method_info &mi : cu->method_list) + for (const delayed_method_info &mi : cu->method_list) { const char *physname; struct fn_fieldlist *fn_flp @@ -10086,8 +10086,8 @@ static void rust_union_quirks (struct dwarf2_cu *cu) { gdb_assert (cu->language == language_rust); - for (struct type *type : cu->rust_unions) - quirk_rust_enum (type, cu->per_cu->dwarf2_per_objfile->objfile); + for (type *type_ : cu->rust_unions) + quirk_rust_enum (type_, cu->per_cu->dwarf2_per_objfile->objfile); /* We don't need this any more. */ cu->rust_unions.clear (); } |