This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 3/11] Add MIPS_MAX_REGISTER_SIZE (4/4)
- From: Pedro Alves <palves at redhat dot com>
- To: Alan Hayward <Alan dot Hayward at arm dot com>, "Maciej W. Rozycki" <macro at imgtec dot com>
- Cc: Yao Qi <qiyaoltc at gmail dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, nd <nd at arm dot com>
- Date: Fri, 9 Jun 2017 12:03:37 +0100
- Subject: Re: [PATCH 3/11] Add MIPS_MAX_REGISTER_SIZE (4/4)
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=palves at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 4629285547
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4629285547
- References: <3C00280E-37C9-4C0A-9DA6-F3B9DB1A6E8F@arm.com> <86y3v7uf9j.fsf@gmail.com> <0150DDF9-6204-4F4F-99E9-D757C1DBD512@arm.com> <434A7317-C19A-4B53-8CB1-C7B4ACEC7D17@arm.com> <alpine.DEB.2.00.1706082100310.21750@tp.orcam.me.uk> <D2365DAB-685B-40C6-923F-07504F10DD92@arm.com>
On 06/09/2017 11:31 AM, Alan Hayward 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.
Thanks,
Pedro Alves