From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 62426 invoked by alias); 24 Nov 2017 16:21:13 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 62415 invoked by uid 89); 24 Nov 2017 16:21:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_NUMSUBJECT,KB_WAM_FROM_NAME_SINGLEWORD,SPF_HELO_PASS,TRACKER_ID,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 24 Nov 2017 16:21:11 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 21C725FD4E; Fri, 24 Nov 2017 16:21:10 +0000 (UTC) Received: from localhost (unused-10-15-17-193.yyz.redhat.com [10.15.17.193]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EA12B5D9CB; Fri, 24 Nov 2017 16:21:09 +0000 (UTC) From: Sergio Durigan Junior To: Philipp Rudo Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Workaround build bug with GCC 6.2.1 References: <87efoobx9r.fsf@redhat.com> <20171124100557.56475-1-prudo@linux.vnet.ibm.com> <20171124100557.56475-2-prudo@linux.vnet.ibm.com> Date: Fri, 24 Nov 2017 16:21:00 -0000 In-Reply-To: <20171124100557.56475-2-prudo@linux.vnet.ibm.com> (Philipp Rudo's message of "Fri, 24 Nov 2017 11:05:57 +0100") Message-ID: <874lpjabre.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2017-11/txt/msg00614.txt.bz2 On Friday, November 24 2017, Philipp Rudo wrote: > Building GDB with GCC 6.2.1 gives multiple errors like > > gdb/dtrace-probe.c: In member function =E2=80=98void dtrace_probe::build_= arg_exprs(gdbarch*)=E2=80=99: > gdb/dtrace-probe.c:627:8: error: types may not be defined in a for-range-= declaration [-Werror] > for (struct dtrace_probe_arg &arg : m_args > > Fix it by removing the 'struct' keyword. > > A similar Bug was already fixed for GCC 6.3.1 > https://sourceware.org/ml/gdb-patches/2017-10/msg00442.html > > gdb/ChangeLog: > > * dtrace-probe.c (dtrace_probe::build_arg_exprs) > (dtrace_probe::is_enabled, dtrace_probe::enable) > (dtrace_probe::disable): Remove keyword 'struct' at for-range > variable > * probe.c (gen_ui_out_table_header_info) > (print_ui_out_not_applicables): Remove keyword 'struct' at > for-range variable This is fine. I pushed it for you: 30649c145114fe3aac089bf06e9457238d46341b Thanks, > --- > gdb/dtrace-probe.c | 8 ++++---- > gdb/probe.c | 4 ++-- > 2 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/gdb/dtrace-probe.c b/gdb/dtrace-probe.c > index ace3d306a1..1c88f89054 100644 > --- a/gdb/dtrace-probe.c > +++ b/gdb/dtrace-probe.c > @@ -624,7 +624,7 @@ dtrace_probe::build_arg_exprs (struct gdbarch *gdbarc= h) > /* Iterate over the arguments in the probe and build the > corresponding GDB internal expression that will generate the > value of the argument when executed at the PC of the probe. */ > - for (struct dtrace_probe_arg &arg : m_args) > + for (dtrace_probe_arg &arg : m_args) > { > struct cleanup *back_to; > struct parser_state pstate; > @@ -684,7 +684,7 @@ dtrace_probe::is_enabled () const > { > struct gdbarch *gdbarch =3D this->get_gdbarch (); >=20=20 > - for (const struct dtrace_probe_enabler &enabler : m_enablers) > + for (const dtrace_probe_enabler &enabler : m_enablers) > if (!gdbarch_dtrace_probe_is_enabled (gdbarch, enabler.address)) > return false; >=20=20 > @@ -796,7 +796,7 @@ dtrace_probe::enable () >=20=20 > /* Iterate over all defined enabler in the given probe and enable > them all using the corresponding gdbarch hook. */ > - for (const struct dtrace_probe_enabler &enabler : m_enablers) > + for (const dtrace_probe_enabler &enabler : m_enablers) > if (gdbarch_dtrace_enable_probe_p (gdbarch)) > gdbarch_dtrace_enable_probe (gdbarch, enabler.address); > } > @@ -826,7 +826,7 @@ dtrace_probe::disable () >=20=20 > /* Iterate over all defined enabler in the given probe and disable > them all using the corresponding gdbarch hook. */ > - for (struct dtrace_probe_enabler &enabler : m_enablers) > + for (dtrace_probe_enabler &enabler : m_enablers) > if (gdbarch_dtrace_disable_probe_p (gdbarch)) > gdbarch_dtrace_disable_probe (gdbarch, enabler.address); > } > diff --git a/gdb/probe.c b/gdb/probe.c > index 1be8faad35..e20bf31630 100644 > --- a/gdb/probe.c > +++ b/gdb/probe.c > @@ -367,7 +367,7 @@ gen_ui_out_table_header_info (const std::vector &probes, > std::vector headings > =3D spops->gen_info_probes_table_header (); >=20=20 > - for (const struct info_probe_column &column : headings) > + for (const info_probe_column &column : headings) > { > size_t size_max =3D strlen (column.print_name); >=20=20 > @@ -410,7 +410,7 @@ print_ui_out_not_applicables (const static_probe_ops = *spops) > std::vector headings > =3D spops->gen_info_probes_table_header (); >=20=20 > - for (const struct info_probe_column &column : headings) > + for (const info_probe_column &column : headings) > current_uiout->field_string (column.field_name, _("n/a")); > } >=20=20 > --=20 > 2.13.5 --=20 Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/