Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Apr 2002 16:34:57 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        Mark Murray <markm@FreeBSD.org>, <cvs-all@FreeBSD.org>, <cvs-committers@FreeBSD.org>
Subject:   RE: cvs commit: src/sys/sys lock.h
Message-ID:  <20020424162516.L14982-100000@gamplex.bde.org>
In-Reply-To: <XFMail.20020423183207.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020424162516.L14982-100000>