From: Simon Marchi Date: Mon, 27 Feb 2017 19:09:34 +0000 (-0500) Subject: Remove struct keyword from range-based for loop X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d538e36decd5628c084dbd5a7de13719b8b92121;p=binutils-gdb.git Remove struct keyword from range-based for loop The previous patch introduced this error with recent-ish GCCs: ../../binutils-gdb/gdb/remote.c: In function ‘int remote_add_target_side_condition(gdbarch*, bp_target_info*, char*, char*)’: ../../binutils-gdb/gdb/remote.c:9668:8: error: types may not be defined in a for-range-declaration [-Werror] for (struct agent_expr *aexpr : bp_tgt->conditions) ^~~~~~ Removing the struct keyword fixes the error. gdb/ChangeLog: * remote.c (remote_add_target_side_condition): Remove "struct" keyword from range-based for loop. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a872f1bfb98..fafa10c84e4 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2017-02-27 Simon Marchi + + * remote.c (remote_add_target_side_condition): Remove "struct" + keyword from range-based for loop. + 2017-02-27 Simon Marchi * remote.c (remote_add_target_side_condition): Use range-based diff --git a/gdb/remote.c b/gdb/remote.c index aedbd08cc43..5da83198234 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -9665,7 +9665,7 @@ remote_add_target_side_condition (struct gdbarch *gdbarch, buf++; /* Send conditions to the target. */ - for (struct agent_expr *aexpr : bp_tgt->conditions) + for (agent_expr *aexpr : bp_tgt->conditions) { xsnprintf (buf, buf_end - buf, "X%x,", aexpr->len); buf += strlen (buf);