From owner-cvs-all Tue Apr 23 23:34:23 2002 Delivered-To: cvs-all@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 25C9937B421; Tue, 23 Apr 2002 23:34:09 -0700 (PDT) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id QAA27340; Wed, 24 Apr 2002 16:33:58 +1000 Date: Wed, 24 Apr 2002 16:34:57 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: John Baldwin Cc: Mark Murray , , Subject: RE: cvs commit: src/sys/sys lock.h In-Reply-To: Message-ID: <20020424162516.L14982-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, 23 Apr 2002, John Baldwin wrote: > On 21-Apr-2002 Mark Murray wrote: > > markm 2002/04/21 03:42:15 PDT > > > > Modified files: > > sys/sys lock.h > > Log: > > Parenthesise macro arguments to reduce lint warnings. > > These were parens around the whole macro, not the macro arguments. This reminds me of strange parentheses in queue.h. The old code has lots of macros of the form: #define foo(x) bar((x)) and a recent change fixed a couple of cases where the doubled parentheses were "missing". AFAIK there is only a bad reason for these doubled parentheses like this: to avoid having to parenthesize macro args in macros lower level macros (like bar() here). N'tupled parentheses would be needed in the top level if there were N-1 lower levels with missing parentheses. The queue macros know how many lower levels there are, but this is not the way to write macros. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message