From owner-freebsd-current Fri Mar 13 08:46:19 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA23731 for freebsd-current-outgoing; Fri, 13 Mar 1998 08:46:19 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from sumatra.americantv.com (sumatra.americantv.com [207.170.17.37]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA23705; Fri, 13 Mar 1998 08:46:14 -0800 (PST) (envelope-from jlemon@americantv.com) Received: from right.PCS (right.PCS [148.105.10.31]) by sumatra.americantv.com (8.8.5/8.8.5) with ESMTP id KAA28779; Fri, 13 Mar 1998 10:46:11 -0600 (CST) Received: (from jlemon@localhost) by right.PCS (8.6.13/8.6.4) id KAA28758; Fri, 13 Mar 1998 10:45:36 -0600 Message-ID: <19980313104536.00177@right.PCS> Date: Fri, 13 Mar 1998 10:45:36 -0600 From: Jonathan Lemon To: shimon@simon-shapiro.org Cc: "Jonathan M. Bresler" , freebsd-current@FreeBSD.ORG Subject: Re: A question about sys/sys/queue.h References: <199803130339.TAA10294@hub.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.61.1 In-Reply-To: ; from Simon Shapiro on Mar 03, 1998 at 09:51:07PM -0800 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mar 03, 1998 at 09:51:07PM -0800, Simon Shapiro wrote: > > On 13-Mar-98 Jonathan M. Bresler wrote: > > Simon Shapiro wrote: > >> Why was the definition of some macros changed > >> from: > >> > >> #define FOO { ... } > >> > >> to: > >> > >> #define FOO do { ... } while(0) > >> > >> I thought these are the same... > >> > > > > the difference lies in how you use them. > > in the first case one writes "FOO" > > in the second "FOO;" Huh? Did I miss something, or am I too used to gcc? I thought semicolons after braces were optional. The following code works: main() { { printf("hello world!\n"); };;;;;; } All the change does is make the trailing semicolon mandatory. -- Jonathan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message