From owner-freebsd-hackers Fri Jun 5 14:25:48 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA19196 for freebsd-hackers-outgoing; Fri, 5 Jun 1998 14:25:48 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from whistle.com (s205m131.whistle.com [207.76.205.131]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA19091 for ; Fri, 5 Jun 1998 14:25:10 -0700 (PDT) (envelope-from archie@whistle.com) Received: (from smap@localhost) by whistle.com (8.7.5/8.6.12) id OAA02416; Fri, 5 Jun 1998 14:24:37 -0700 (PDT) Received: from bubba.whistle.com(207.76.205.7) by whistle.com via smap (V1.3) id sma002412; Fri Jun 5 14:24:29 1998 Received: (from archie@localhost) by bubba.whistle.com (8.8.7/8.6.12) id OAA02209; Fri, 5 Jun 1998 14:24:29 -0700 (PDT) From: Archie Cobbs Message-Id: <199806052124.OAA02209@bubba.whistle.com> Subject: Re: style(9) error? In-Reply-To: <199806051138.GAA02086@swing.ca.sandia.gov> from Chris Csanady at "Jun 5, 98 06:38:04 am" To: cc@swing.ca.sandia.gov (Chris Csanady) Date: Fri, 5 Jun 1998 14:24:29 -0700 (PDT) Cc: lada@pc8811.gud.siemens.at, grog@lemis.com, freebsd-hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL31 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Chris Csanady writes: > Thank you.. This is indeed what I was thinking, and how I read the man > page. I actually did some further looking, and it seems that it is > possble to do this, only using something slightly different. > > #define BLA(x) ({ (x); }) > > This actually works in a conditional, assignment, etc.. evaluating the > block to the last statement as I was expecting. Is there a reason why > the do {} while(0) would be preffered over this? I believe that your definition only works because it's a gcc extra feature. The do {} while (0) method is ANSI compatible. -Archie ___________________________________________________________________________ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message