summaryrefslogtreecommitdiff
path: root/gdb/linespec.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2018-05-29 20:13:04 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2018-05-29 20:13:06 -0400
commit5294170687db7d997a00f88b765ef353121aa441 (patch)
treedbfdd1cda4556ed4af904c4b6e9478c1889b6e0f /gdb/linespec.c
parent51af6fa066ee6e4ce0ef203678b3281d71f29cbb (diff)
downloadbinutils-gdb-5294170687db7d997a00f88b765ef353121aa441.tar.gz
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/linespec.c')
-rw-r--r--gdb/linespec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/linespec.c b/gdb/linespec.c
index 835650750cf..a60f2742db1 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -3697,7 +3697,7 @@ find_superclass_methods (std::vector<struct type *> &&superclasses,
{
std::vector<struct type *> new_supers;
- for (struct type *t : superclasses)
+ for (type *t : superclasses)
find_methods (t, name_lang, name, result_names, &new_supers);
if (result_names->size () != old_len || new_supers.empty ())
@@ -4464,7 +4464,7 @@ search_minsyms_for_name (struct collect_info *info,
classification as the very first minsym in the list. */
classification = classify_mtype (MSYMBOL_TYPE (minsyms[0].minsym));
- for (const struct bound_minimal_symbol &item : minsyms)
+ for (const bound_minimal_symbol &item : minsyms)
{
if (classify_mtype (MSYMBOL_TYPE (item.minsym)) != classification)
break;