diff options
author | Philipp Rudo <prudo@linux.vnet.ibm.com> | 2017-11-24 11:05:57 +0100 |
---|---|---|
committer | Sergio Durigan Junior <sergiodj@redhat.com> | 2017-11-24 11:16:37 -0500 |
commit | 30649c145114fe3aac089bf06e9457238d46341b (patch) | |
tree | 96abcd9314eb64fdc6719187f8dfbd4a75c5492a /gdb/probe.c | |
parent | 7696f5c95761be03db7ac62683aa027ecea30fa7 (diff) | |
download | gdb-30649c145114fe3aac089bf06e9457238d46341b.zip gdb-30649c145114fe3aac089bf06e9457238d46341b.tar.gz gdb-30649c145114fe3aac089bf06e9457238d46341b.tar.bz2 |
Workaround build bug with GCC 6.2.1
Building GDB with GCC 6.2.1 gives multiple errors like
gdb/dtrace-probe.c: In member function ‘void dtrace_probe::build_arg_exprs(gdbarch*)’:
gdb/dtrace-probe.c:627:8: error: types may not be defined in a for-range-declaration [-Werror]
for (struct dtrace_probe_arg &arg : m_args
Fix it by removing the 'struct' keyword.
A similar Bug was already fixed for GCC 6.3.1
https://sourceware.org/ml/gdb-patches/2017-10/msg00442.html
gdb/ChangeLog:
* dtrace-probe.c (dtrace_probe::build_arg_exprs)
(dtrace_probe::is_enabled, dtrace_probe::enable)
(dtrace_probe::disable): Remove keyword 'struct' at for-range
variable
* probe.c (gen_ui_out_table_header_info)
(print_ui_out_not_applicables): Remove keyword 'struct' at
for-range variable
Diffstat (limited to 'gdb/probe.c')
-rw-r--r-- | gdb/probe.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/probe.c b/gdb/probe.c index 1be8faa..e20bf31 100644 --- a/gdb/probe.c +++ b/gdb/probe.c @@ -367,7 +367,7 @@ gen_ui_out_table_header_info (const std::vector<bound_probe> &probes, std::vector<struct info_probe_column> headings = spops->gen_info_probes_table_header (); - for (const struct info_probe_column &column : headings) + for (const info_probe_column &column : headings) { size_t size_max = strlen (column.print_name); @@ -410,7 +410,7 @@ print_ui_out_not_applicables (const static_probe_ops *spops) std::vector<struct info_probe_column> headings = spops->gen_info_probes_table_header (); - for (const struct info_probe_column &column : headings) + for (const info_probe_column &column : headings) current_uiout->field_string (column.field_name, _("n/a")); } |