This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH RFA] mi/mi-main.c: Don't use variable-length array extension
- To: Kevin Buettner <kevinb at cygnus dot com>
- Subject: Re: [PATCH RFA] mi/mi-main.c: Don't use variable-length array extension
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Mon, 09 Jul 2001 10:21:09 -0400
- Cc: gdb-patches at sources dot redhat dot com
- References: <1010709062833.ZM9934@ocotillo.lan>
> These are probably obvious fixes, but I used alloca() which is
> sometimes considered objectionable, so I decided to ask for approval.
> I'm willing to rework the patch to use xmalloc(), make_cleanup(), etc,
> but it will be messier.
>
> * mi-main.c (register_changed_p, get_register): Use alloca()
> to allocate space previously allocated via gcc's
> variable-length array extension.
This is one of the uses of alloca that everyone has grown accustomed to.
Andrew