Re: [PATCH 07/13] gdb/csky: remove uses of sprintf

Simon Marchi <[email protected]>
Newsgroups gmane.comp.gdb.patches,gmane.comp.gnu.binutils
Message-ID <[email protected]>
On 8/17/26 4:50 PM, Tom Tromey wrote:
>>>>>> "Andrew" == Andrew Burgess <[email protected]> writes:
> 
> Andrew> to gdbsupport/common-utils.h.  This is fine except that gcc is unable to
> Andrew> track the format literal through the template call, so I think we'd
> Andrew> actually have to do:
> 
> It might work if instead the 'buf' argument were a gdb::array_view,
> which I think can be implicitly constructed from an array.

I tried changing xsnprintf to use array_view, but it was too big of a
change.  I did not think about adding a new overload though, I think
that could work.

Simon
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.