From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 54646 invoked by alias); 27 Feb 2017 19:57:45 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 54607 invoked by uid 89); 27 Feb 2017 19:57:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=Hx-languages-length:1399, H*i:sk:1488225, H*f:sk:1488225, informed X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 27 Feb 2017 19:57:42 +0000 Received: by simark.ca (Postfix, from userid 33) id E52111E152; Mon, 27 Feb 2017 14:57:40 -0500 (EST) To: Steve Ellcey Subject: Re: GDB build failure when using latest (ToT) GCC X-PHP-Originating-Script: 33:rcube.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Mon, 27 Feb 2017 19:57:00 -0000 From: Simon Marchi Cc: gdb@sourceware.org In-Reply-To: <1488225059.2866.220.camel@caviumnetworks.com> References: <1488225059.2866.220.camel@caviumnetworks.com> Message-ID: <826291c6a32e75be84c1582f7205b282@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.2.3 X-IsSubscribed: yes X-SW-Source: 2017-02/txt/msg00054.txt.bz2 On 2017-02-27 14:50, Steve Ellcey wrote: > I am building the ToT gdb with a ToT GCC and getting this error: > > ../../../src/binutils-gdb/gdb/remote.c: In function ‘int > remote_add_target_side_ > condition(gdbarch*, bp_target_info*, char*, char*)’: > ../../../src/binutils-gdb/gdb/remote.c:9668:8: error: types may not be > defined i > n a for-range-declaration [-fpermissive] >    for (struct agent_expr *aexpr : bp_tgt->conditions) >         ^~~~~~ > Makefile:1898: recipe for target 'remote.o' failed > > > Does anyone know how to change this code so that GCC will not complain? > I am not familiar with C++ for ranges. I get a bunch of warnings too, > but this > is a hard error that stops my compilation.  Yes, I can use -fpermissive > but I > would rather not and this will need to be fixed when GCC 7.X comes out. Hi Steve, I indeed broke the build for recent GCCs in Use range-based for loop in remote_add_target_side_condition 8362122330c97c8c4a15da4e7ba8aa29f0c11157 and fixed it right after with Remove struct keyword from range-based for loop d538e36decd5628c084dbd5a7de13719b8b92121 I am still using an ancient 4.8 GCC, so I did not see it, but Sergio's buildbot informed me within a few minutes. Let's just pretend it was a test for the bot :). Sorry about the inconvenience and thanks for being alert. Simon