This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, committed] xcoffout_declare_function strip encoding
- From: Richard Henderson <rth at redhat dot com>
- To: David Edelsohn <dje at watson dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 14 Dec 2004 16:06:05 -0800
- Subject: Re: [PATCH, committed] xcoffout_declare_function strip encoding
- References: <200412131953.iBDJrrD32146@makai.watson.ibm.com>
On Mon, Dec 13, 2004 at 02:53:52PM -0500, David Edelsohn wrote:
> ! len = strlen (name);
> ! if (name[len - 1] == ']')
> ! {
> ! char *n = alloca (len - 3);
> ! strncpy (n, name, len - 4);
memcpy would be better. You know there are no embedded nulls.
r~