This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ bootstrap (part 10/n): Use XNEW, GCC_NEW etc.
- From: Bernardo Innocenti <bernie at develer dot com>
- To: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 26 Jul 2004 02:43:13 +0200
- Subject: Re: C++ bootstrap (part 10/n): Use XNEW, GCC_NEW etc.
- Organization: Develer S.r.l.
- References: <41041D1B.3040500@develer.com> <m38yd7vin0.fsf@uniton.integrable-solutions.net>
Gabriel Dos Reis wrote:
> Bernardo Innocenti <bernie@develer.com> writes:
> | - char *s = xrealloc ((char *)$1, l1 + l2 + 1);
> | + char *s = (char *) xrealloc ((char *)$1, l1 + l2 + 1);
>
> Why isn't this a XRESIZEVAR or XRESIZEVEC?
I must have missed that. Fixed.
>
> | memcpy (s + l1, $2, l2 + 1);
> | free ((void *)$2);
>
> For consistency, should not this be a XDELETE or XDELETEVEC?
You're right, fixed.
> [...]
>
> | - o->buf = xrealloc (o->buf, new_len);
> | + o->buf = (char *) xrealloc (o->buf, new_len);
>
> Same comments here.
Fixed too.
--
// Bernardo Innocenti - Develer S.r.l., R&D dept.
\X/ http://www.develer.com/