From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22521 invoked by alias); 26 Jun 2004 17:37:07 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 22505 invoked from network); 26 Jun 2004 17:37:06 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 26 Jun 2004 17:37:06 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1BeH6p-0000ON-D0; Sat, 26 Jun 2004 13:36:59 -0400 Date: Sat, 26 Jun 2004 17:37:00 -0000 From: Daniel Jacobowitz To: Andrew Cagney Cc: Bernardo Innocenti , Ian Lance Taylor , GCC Patches , gdb-patches@sources.redhat.com, binutils@sources.redhat.com, DJ Delorie Subject: Re: [top-level] C++-friendly allocators for libiberty Message-ID: <20040626173658.GA1480@nevyn.them.org> Mail-Followup-To: Andrew Cagney , Bernardo Innocenti , Ian Lance Taylor , GCC Patches , gdb-patches@sources.redhat.com, binutils@sources.redhat.com, DJ Delorie References: <40DCC86A.4010306@develer.com> <40DCD0EE.9010208@develer.com> <40DCE1C8.4020202@develer.com> <20040626024617.GA31620@nevyn.them.org> <40DDB0B7.1040902@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40DDB0B7.1040902@gnu.org> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-06/txt/msg00476.txt.bz2 On Sat, Jun 26, 2004 at 01:21:59PM -0400, Andrew Cagney wrote: > > >>>>> No, people use realloc with variable size arrays at the end of > >>>>> structs. xrenewvec (or xresizevec) is a good idea, but you still need > >>>>> xrenew (or xresize). > > > > > >Bernando, you've now got an interface which allows reallocating to a > >variable size, but not allocating to one... There's no need for a > >rush, let's give people some time to comment before putting this into > >libiberty. As DJ says, it's hard to take things out of libiberty. > > I guess daniel had this in mind: No, not at all. > They first appeared in GDB in '99 and were added to GDB's global header > file in '02 (and I'm sure the idea was stolen from elsewhere). Unlike > the macros being proposed, these: > > - use uppercase to make it very very clear that they are macros > - are named in a way that directly reflects their C herritage > > While I agree with the type casing idea underlying "xnew" et.al. (I was > in part responsible for the above :-), I don't see any benefit in > adopting C++ names and pretending that we're writing C++. You might want to read the discussion on gcc@ and gcc-patches@ that prompted the use of C++ style names... -- Daniel Jacobowitz