aboutsummaryrefslogtreecommitdiff
path: root/gdb/target.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2018-12-26 20:14:08 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2018-12-26 20:14:18 -0500
commit84b68c77e7f1c8c883ff94aaa2fce0df2eab0877 (patch)
treef9bbe96fe9f35cde16ac158eee3ff1921168adb8 /gdb/target.c
parent39c2d8290bfea758aaa7edb2a10faf2076b950bc (diff)
downloadgdb-84b68c77e7f1c8c883ff94aaa2fce0df2eab0877.zip
gdb-84b68c77e7f1c8c883ff94aaa2fce0df2eab0877.tar.gz
gdb-84b68c77e7f1c8c883ff94aaa2fce0df2eab0877.tar.bz2
target.c: Remove struct keyword in range-based for
I get this when compiling with a gcc 6.3.0-based cross-compiler: CXX target.o /home/simark/src/binutils-gdb/gdb/target.c: In static member function 'static void target_terminal::restore_inferior()': /home/simark/src/binutils-gdb/gdb/target.c:396:10: error: types may not be defined in a for-range-declaration [-Werror] for (struct inferior *inf : all_inferiors ()) ^~~~~~ Accomodate it by dropping the unnecessary struct keyword. Actually, I used "::inferior", otherwise it resolves to the inferior method of the target_terminal class. gdb/ChangeLog: * target.c (target_terminal::restore_inferior): Remove struct keyword.
Diffstat (limited to 'gdb/target.c')
-rw-r--r--gdb/target.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/target.c b/gdb/target.c
index 6c63255..0a6747b 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -393,7 +393,7 @@ target_terminal::restore_inferior (void)
{
scoped_restore_current_inferior restore_inferior;
- for (struct inferior *inf : all_inferiors ())
+ for (::inferior *inf : all_inferiors ())
{
if (inf->terminal_state == target_terminal_state::is_ours_for_output)
{