Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Mar 2004 01:00:36 -0800
From:      David Schultz <das@FreeBSD.ORG>
To:        "David O'Brien" <obrien@FreeBSD.ORG>
Cc:        Nate Lawson <nate@root.org>
Subject:   Re: cvs commit: src/sys/kern subr_bus.c
Message-ID:  <20040324090036.GA61340@VARK.homeunix.com>
In-Reply-To: <20040323025048.GA46675@dragon.nuxi.com>
References:  <20040322223625.430EF16A4F2@hub.freebsd.org> <20040322180452.A35931@root.org> <20040323025048.GA46675@dragon.nuxi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Mar 22, 2004, David O'Brien wrote:
> On Mon, Mar 22, 2004 at 06:06:48PM -0800, Nate Lawson wrote:
> > > +			if (bootverbose && flags & INTR_MPSAFE)
> .. 
> > I recommend you parenthesize (flags & INTR_MPSAFE).
> 
> man operator  :-)

For some reason, gcc complains about the lack of excessive
parentheses for expressions like 'a && b || c' and
'foo >> shift1 + shift2', but not for 'a && b & c'.
It's too bad there's no documentation on which parts of
operator(7) are supposed to be considered obvious (along
with a note that =='s priority over & is a mistake---that
one often bites me.)



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