From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11882 invoked by alias); 27 Jun 2004 05:05:55 -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 11710 invoked from network); 27 Jun 2004 05:05:54 -0000 Received: from unknown (HELO develer.com) (151.38.19.110) by sourceware.org with SMTP; 27 Jun 2004 05:05:54 -0000 Received: (qmail 13539 invoked from network); 27 Jun 2004 05:05:44 -0000 Received: from beetle.trilan (HELO ?10.3.2.254?) (?YFeOx3vEPjQCGxKxwYLnDYTAvy8BQdoG?@10.3.2.254) by trinity.trilan with SMTP; 27 Jun 2004 05:05:44 -0000 Message-ID: <40DE55A8.4000905@develer.com> Date: Sun, 27 Jun 2004 05:05:00 -0000 From: Bernardo Innocenti Organization: Develer S.r.l. User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040625 MIME-Version: 1.0 To: Alexandre Oliva CC: 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 References: <40DCC86A.4010306@develer.com> <40DCD0EE.9010208@develer.com> <40DCE1C8.4020202@develer.com> <40DCF8FA.4090700@develer.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2004-06/txt/msg00484.txt.bz2 Alexandre Oliva wrote: > On Jun 26, 2004, Bernardo Innocenti wrote: > >> #define foo , >> xresize(struct foo, f, 10); > >>...but how could one possibly abuse this to generate code >>that actually compiles? > > If it's C++, one could overload xrealloc. I tend to prefer to enclose > all macro arguments in parentheses, even when not strictly necessary, > than to risk missing one case. OK, better safe than sorry, I guess. > And, as Falk pointed out, the full expansion of the macro should be > enclosed in parentheses as well. Done already. -- // Bernardo Innocenti - Develer S.r.l., R&D dept. \X/ http://www.develer.com/