From: Shahab Vahedi via Gdb-patches <gdb-patches@sourceware.org>
To: Tom Tromey <tom@tromey.com>
Cc: Shahab Vahedi <shahab@synopsys.com>,
Shahab Vahedi via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] arc: Fix gcc-4.8 compilation failure for arc.c
Date: Tue, 9 Feb 2021 18:03:26 +0100 [thread overview]
Message-ID: <YCLAXsfMjdZP6aIj@gmail.com> (raw)
In-Reply-To: <87mtwdcmyt.fsf@tromey.com>
On Tue, Feb 09, 2021 at 07:52:42AM -0700, Tom Tromey wrote:
> Shahab> target_desc *tdesc = arc_create_target_description (features);
>
> Shahab> - /* Add the newly created target description to the repertoire. */
> Shahab> - arc_tdesc_cache.emplace (features, tdesc);
> Shahab> + /* Add the newly created target description to the repertoire.
> Shahab> + PR build/27385: Use "target_desc_up ()" ctor explicitly. */
> Shahab> + arc_tdesc_cache.emplace (features, target_desc_up (tdesc));
>
> Shahab> return tdesc;
>
> I was going to suggest that arc_create_target_description return a
> target_desc_up, but when I look at the code, I see it already does, and
> that this line is different:
>
> arc_tdesc_cache.emplace (features, std::move (tdesc));
>
> So I suspect this is already fixed.
It is fixed in the trunk [1][2]. However, those are big patches.
I think it is better (safer?) to keep the fix small like the one
for RISCV [3].
Cheers,
Shahab
[1] gdb: Have allocate_target_description return a unique_ptr
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=51a948fdf0e
[2] gdb: Delay releasing target_desc_up in more cases
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=bbb826f5e92
[3] [gdb/build] Fix missing implicit constructor call with gcc 4.8
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=38f8aa06d9c
next prev parent reply other threads:[~2021-02-09 17:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-09 9:12 Shahab Vahedi via Gdb-patches
2021-02-09 14:52 ` Tom Tromey
2021-02-09 17:03 ` Shahab Vahedi via Gdb-patches [this message]
2021-02-09 17:11 ` Tom Tromey
2021-02-09 17:41 ` [PUSHED gdb-10-branch] " Shahab Vahedi via Gdb-patches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YCLAXsfMjdZP6aIj@gmail.com \
--to=gdb-patches@sourceware.org \
--cc=shahab.vahedi@gmail.com \
--cc=shahab@synopsys.com \
--cc=tom@tromey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox