Remove struct keyword from range-based for loop
authorSimon Marchi <simon.marchi@ericsson.com>
Mon, 27 Feb 2017 19:09:34 +0000 (14:09 -0500)
committerSimon Marchi <simon.marchi@ericsson.com>
Mon, 27 Feb 2017 19:09:34 +0000 (14:09 -0500)
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.

gdb/ChangeLog
gdb/remote.c

index a872f1bfb98108bf1def015a2563f2e80c83b9b0..fafa10c84e47cd8f200b20b668794950a7c32d6b 100644 (file)
@@ -1,3 +1,8 @@
+2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
+
+       * remote.c (remote_add_target_side_condition): Remove "struct"
+       keyword from range-based for loop.
+
 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
 
        * remote.c (remote_add_target_side_condition): Use range-based
index aedbd08cc43e60393db9a4886a5ddb274b38f603..5da831982344a69d2c97ed01821bdd41d17e1fd1 100644 (file)
@@ -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);
This page took 0.053724 seconds and 4 git commands to generate.