[PATCH] Remove a copy from c-exp.y:parse_number

Keith Seitz keiths@redhat.com
Wed Apr 17 14:21:57 GMT 2024


On 4/17/24 00:01, Tom Tromey wrote:
> parse_number copies its input string, but there is no need to do this.
> This patch removes the copy.
> 
> Regression tested on x86-64 Fedora 38.

Out of curiosity, I did a little digging into this, well,
curiosity...

I committed that over a decade ago, and my notes mention some
of the difficulties with generic parser constification I was
having at the time, including having to fudge several places
with alloca.

So if there was a reason for it back then, it was a hack, and
it is now obviously long gone.

Reviewed-by: Keith Seitz <keiths@redhat.com>

Thank you,
Keith



More information about the Gdb-patches mailing list