Re: GDB 7.99.91 MinGW compilation error in cli-script.c

Eli Zaretskii
2017-05-19T11:17:16Z

> Cc: gdb-patches@sourceware.org
> From: Pedro Alves <palves@redhat.com>
> Date: Fri, 19 May 2017 10:48:57 +0100
>
> On 05/19/2017 10:10 AM, Eli Zaretskii wrote:
> >> Date: Wed, 17 May 2017 19:01:23 +0300
> >> From: Eli Zaretskii <eliz@gnu.org>
> >> CC: simon.marchi@polymtl.ca, gdb-patches@sourceware.org
> >>
> >> I will probably post later a workaround patch for older versions,
> >> but that's for master. I see no reason to delay the release or to
> >> have the fix on the branch.
> >
> > Is the below OK? It's a bit ugly, and a small fix is needed even for
> > the latest MinGW runtime.
>
> Messing with libstdc++ internal macros and changing what libstdc++
> defines is recipe for undefined behavior and trouble. I'd prefer
> avoiding it if possible.
>
> How about going back to the original gdb::to_string, implemented
> in terms of stringstring:
>
> https://sourceware.org/ml/gdb-patches/2016-10/msg00535.html
>
> ... with a tweak to only use if it the host compiler doesn't support
> std::to_string, like the patchlet below.

Fine with me, but Someone(TM) should figure out what to use instead of
"#if 0".