From patchwork Sat Jul 14 02:09:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 28393 Received: (qmail 124141 invoked by alias); 14 Jul 2018 02:09:28 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 124132 invoked by uid 89); 14 Jul 2018 02:09:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_SOFTFAIL autolearn=ham version=3.3.2 spammy= X-HELO: barracuda.ebox.ca Received: from barracuda.ebox.ca (HELO barracuda.ebox.ca) (96.127.255.19) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 14 Jul 2018 02:09:26 +0000 Received: from smtp.ebox.ca (smtp.electronicbox.net [96.127.255.82]) by barracuda.ebox.ca with ESMTP id S7n9dG09jF4kMMAg (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 13 Jul 2018 22:09:14 -0400 (EDT) Received: from simark.lan (unknown [192.222.164.54]) by smtp.ebox.ca (Postfix) with ESMTP id 91733441B21; Fri, 13 Jul 2018 22:09:14 -0400 (EDT) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [pushed] Remove struct keyword in range-based for loop Date: Fri, 13 Jul 2018 22:09:13 -0400 Message-Id: <20180714020913.30185-1-simon.marchi@polymtl.ca> X-IsSubscribed: yes Fix this with gcc 6.3.0: /home/simark/src/binutils-gdb/gdb/symfile.c: In function 'void set_objfile_default_section_offset(objfile*, const section_addr_info&, CORE_ADDR)': /home/simark/src/binutils-gdb/gdb/symfile.c:2114:14: error: types may not be defined in a for-range-declaration [-Werror] for (const struct other_sections *objf_sect : objf_addrs_sorted) ^~~~~~ gdb/ChangeLog: * symfile.c (set_objfile_default_section_offset): Remove struct keyword. --- gdb/ChangeLog | 5 +++++ gdb/symfile.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d4b0eb1d3e63..ba4eba73fb54 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2018-07-13 Simon Marchi + + * symfile.c (set_objfile_default_section_offset): Remove struct + keyword. + 2018-07-14 Stafford Horne * (Responsible Maintainers): Add myself as or1k maintainer. diff --git a/gdb/symfile.c b/gdb/symfile.c index 62b38bd61825..3614aa3f9555 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -2111,7 +2111,7 @@ set_objfile_default_section_offset (struct objfile *objf, std::vector::iterator addrs_sorted_iter = addrs_sorted.begin (); - for (const struct other_sections *objf_sect : objf_addrs_sorted) + for (const other_sections *objf_sect : objf_addrs_sorted) { const char *objf_name = addr_section_name (objf_sect->name.c_str ()); int cmp = -1;