From: Simon Marchi <simon.marchi@ericsson.com>
To: <gdb-patches@sourceware.org>
Cc: Simon Marchi <simon.marchi@polymtl.ca>
Subject: [pushed] Remove struct keyword in range-based for-loop
Date: Wed, 20 Jun 2018 16:43:00 -0000 [thread overview]
Message-ID: <1529513015-1113-1-git-send-email-simon.marchi@ericsson.com> (raw)
From: Simon Marchi <simon.marchi@polymtl.ca>
Fix this with gcc 6.3.0, and make the loop variable const while at it:
/home/simark/src/binutils-gdb/gdb/record-full.c: In member function 'virtual int record_full_target::insert_breakpoint(gdbarch*, bp_target_info*)':
/home/simark/src/binutils-gdb/gdb/record-full.c:1789:8: error: types may not be defined in a for-range-declaration [-Werror]
for (struct record_full_breakpoint &bp : record_full_breakpoints)
gdb/ChangeLog:
* record-full.c (record_full_target::insert_breakpoint): Remove
"struct" keyword, add const.
---
gdb/ChangeLog | 5 +++++
gdb/record-full.c | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c66b686..ff304fe 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * record-full.c (record_full_target::insert_breakpoint): Remove
+ "struct" keyword, add const.
+
2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
* common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
diff --git a/gdb/record-full.c b/gdb/record-full.c
index a1bc017..6465ab5 100644
--- a/gdb/record-full.c
+++ b/gdb/record-full.c
@@ -1786,7 +1786,7 @@ record_full_target::insert_breakpoint (struct gdbarch *gdbarch,
/* Use the existing entries if found in order to avoid duplication
in record_full_breakpoints. */
- for (struct record_full_breakpoint &bp : record_full_breakpoints)
+ for (const record_full_breakpoint &bp : record_full_breakpoints)
{
if (bp.addr == bp_tgt->placed_address
&& bp.address_space == bp_tgt->placed_address_space)
--
2.7.4
reply other threads:[~2018-06-20 16:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1529513015-1113-1-git-send-email-simon.marchi@ericsson.com \
--to=simon.marchi@ericsson.com \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@polymtl.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).