* GDB build failure when using latest (ToT) GCC
@ 2017-02-27 19:51 Steve Ellcey
2017-02-27 19:57 ` Simon Marchi
0 siblings, 1 reply; 3+ messages in thread
From: Steve Ellcey @ 2017-02-27 19:51 UTC (permalink / raw)
To: gdb
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.
Steve Ellcey
sellcey@cavium.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: GDB build failure when using latest (ToT) GCC
2017-02-27 19:51 GDB build failure when using latest (ToT) GCC Steve Ellcey
@ 2017-02-27 19:57 ` Simon Marchi
2017-02-27 21:11 ` Steve Ellcey
0 siblings, 1 reply; 3+ messages in thread
From: Simon Marchi @ 2017-02-27 19:57 UTC (permalink / raw)
To: Steve Ellcey; +Cc: gdb
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: GDB build failure when using latest (ToT) GCC
2017-02-27 19:57 ` Simon Marchi
@ 2017-02-27 21:11 ` Steve Ellcey
0 siblings, 0 replies; 3+ messages in thread
From: Steve Ellcey @ 2017-02-27 21:11 UTC (permalink / raw)
To: Simon Marchi; +Cc: gdb
On Mon, 2017-02-27 at 14:57 -0500, Simon Marchi wrote:
>Â
> 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
No problem, thanks for the quick fix. Â Everything is building for me
again.
Steve Ellcey
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-02-27 21:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-27 19:51 GDB build failure when using latest (ToT) GCC Steve Ellcey
2017-02-27 19:57 ` Simon Marchi
2017-02-27 21:11 ` Steve Ellcey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox