This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix warning on gdb/compile/compile.c (C++-ify "triplet_rx")
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Sergio Durigan Junior <sergiodj at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 17 Jan 2018 17:32:50 +0200
- Subject: Re: [PATCH] Fix warning on gdb/compile/compile.c (C++-ify "triplet_rx")
- Authentication-results: sourceware.org; auth=none
- References: <87po69zkxe.fsf@redhat.com> <20180116194641.22361-1-sergiodj@redhat.com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> From: Sergio Durigan Junior <sergiodj@redhat.com>
> Cc: Eli Zaretskii <eliz@gnu.org>, Sergio Durigan Junior <sergiodj@redhat.com>
> Date: Tue, 16 Jan 2018 14:46:41 -0500
>
> This fixes a GCC warning that happens when compiling
> gdb/compile/compile.c on some GCC versions (e.g., "gcc (GCC) 7.2.1
> 20180104 (Red Hat 7.2.1-6)").
>
> It's a simple patch that converts "triplet_rx" from "char *" to
> "std::string", thus guaranteeing that it will be always initialized.
>
> I've regtested this patch and did not find any regressions. OK to
> apply on both master and 8.1 (after creating a bug for it)?
>
> gdb/ChangeLog:
> 2018-01-16 Sergio Durigan Junior <sergiodj@redhat.com>
>
> * compile/compile.c (compile_to_object): Convert "triplet_rx"
> to "std::string".
Thanks, this fixes the warning for me.