Re: [PATCH 3/11] Add MIPS_MAX_REGISTER_SIZE (4/4)

Maciej W. Rozycki
2017-06-09T11:48:46Z

On Fri, 9 Jun 2017, Pedro Alves wrote:

> > I’ve avoided using variable-length arrays because it has the potential to
> > break the stack.
> > However, here we know that we aren’t going to get a value >8, so maybe in
> > this case a VLA would be ok?
> >
> > Anyone else have an opinion here?
>
> VLAs are not standard C++, unfortunately. Do we know whether all compilers
> we care about support them? It doesn't seem worth it to me to rely
> on compiler extensions when we know we're always going to see a size <=8.

Hmm, `alloca' then? It used to be used here actually, up till commit
d9d9c31f3130 ("MAX_REGISTER_RAW_SIZE -> MAX_REGISTER_SIZE"),
<https://sourceware.org/ml/gdb-patches/2003-05/msg00127.html>.

Maciej