* Commit "Introduce ATTRIBUTE_UNUSED_RESULT and use it" breaks gdb build
@ 2019-03-06 7:49 John Darrington
2019-03-06 14:58 ` Tom Tromey
0 siblings, 1 reply; 2+ messages in thread
From: John Darrington @ 2019-03-06 7:49 UTC (permalink / raw)
To: gdb-patches; +Cc: tromey
This change:
commit 18cb7c9f3add62ff598f0551a767af8aaa04b07e
Author: Tom Tromey <tromey@adacore.com>
Date: Tue Feb 26 14:39:01 2019 -0700
Introduce ATTRIBUTE_UNUSED_RESULT and use it
This introduces the new ATTRIBUTE_UNUSED_RESULT define, and applies it
to gdb_argv::release.
Seems to cause gdb to not compile, when built with default flags.
CXX remote-sim.o
/home/john/binutils-gdb/gdb/remote-sim.c: In function 'void gdbsim_target_open(const char*, int)':
/home/john/binutils-gdb/gdb/remote-sim.c:765:18: error: ignoring return value of 'char** gdb_argv::release()', declared with attribute warn_unused_result [-Werror=unused-result]
argv.release ();
^
cc1plus: all warnings being treated as errors
Makefile:1637: recipe for target 'remote-sim.o' failed
J'
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Commit "Introduce ATTRIBUTE_UNUSED_RESULT and use it" breaks gdb build
2019-03-06 7:49 Commit "Introduce ATTRIBUTE_UNUSED_RESULT and use it" breaks gdb build John Darrington
@ 2019-03-06 14:58 ` Tom Tromey
0 siblings, 0 replies; 2+ messages in thread
From: Tom Tromey @ 2019-03-06 14:58 UTC (permalink / raw)
To: John Darrington; +Cc: gdb-patches, tromey
>>>>> "John" == John Darrington <john@darrington.wattle.id.au> writes:
John> CXX remote-sim.o
John> /home/john/binutils-gdb/gdb/remote-sim.c: In function 'void gdbsim_target_open(const char*, int)':
John> /home/john/binutils-gdb/gdb/remote-sim.c:765:18: error: ignoring return value of 'char** gdb_argv::release()', declared with attribute warn_unused_result [-Werror=unused-result]
John> argv.release ();
John> ^
Sorry about that. I will check in a patch to fix this momentarily.
Someday I'd like gdb to either (1) get rid of remote-sim.c and talk to
the sims using the remote protocol, or (2) arrange to always compile the
bulk of remote-sim.c. (1) would be nice because it would also be more
multi-target-capable.
Tom
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-03-06 14:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-06 7:49 Commit "Introduce ATTRIBUTE_UNUSED_RESULT and use it" breaks gdb build John Darrington
2019-03-06 14:58 ` Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox