From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28545 invoked by alias); 26 Jun 2004 18:31:47 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 28531 invoked from network); 26 Jun 2004 18:31:46 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 26 Jun 2004 18:31:46 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i5QIVke3007957; Sat, 26 Jun 2004 14:31:46 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i5QIVk006847; Sat, 26 Jun 2004 14:31:46 -0400 Received: from livre.redhat.lsd.ic.unicamp.br (vpn64-28.boston.redhat.com [172.16.66.28]) by pobox.corp.redhat.com (8.12.8/8.12.8) with ESMTP id i5QIVipI020444; Sat, 26 Jun 2004 14:31:45 -0400 Received: from livre.redhat.lsd.ic.unicamp.br (livre.redhat.lsd.ic.unicamp.br [127.0.0.1]) by livre.redhat.lsd.ic.unicamp.br (8.12.11/8.12.11) with ESMTP id i5QIVVSB025750; Sat, 26 Jun 2004 15:31:31 -0300 Received: (from aoliva@localhost) by livre.redhat.lsd.ic.unicamp.br (8.12.11/8.12.11/Submit) id i5QIVUqt025747; Sat, 26 Jun 2004 15:31:30 -0300 To: Bernardo Innocenti 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> From: Alexandre Oliva Organization: Red Hat Global Engineering Services Compiler Team Date: Sat, 26 Jun 2004 18:31:00 -0000 In-Reply-To: <40DCF8FA.4090700@develer.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2004-06/txt/msg00572.txt.bz2 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. And, as Falk pointed out, the full expansion of the macro should be enclosed in parentheses as well. -- Alexandre Oliva http://www.ic.unicamp.br/~oliva/ Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org} Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}