cvs commit: src/sys/kern subr_bus.c

David Schultz das at FreeBSD.ORG
Wed Mar 24 01:00:45 PST 2004


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.)


More information about the cvs-src mailing list