aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@ericsson.com>2017-02-27 14:09:34 -0500
committerSimon Marchi <simon.marchi@ericsson.com>2017-02-27 14:09:34 -0500
commitd538e36decd5628c084dbd5a7de13719b8b92121 (patch)
treeddd6c507145020128b3d2fe1a3bdae4ab3b38ab4 /gdb/remote.c
parent8362122330c97c8c4a15da4e7ba8aa29f0c11157 (diff)
downloadgdb-d538e36decd5628c084dbd5a7de13719b8b92121.zip
gdb-d538e36decd5628c084dbd5a7de13719b8b92121.tar.gz
gdb-d538e36decd5628c084dbd5a7de13719b8b92121.tar.bz2
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.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r--gdb/remote.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/remote.c b/gdb/remote.c
index aedbd08..5da8319 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);