On Wed, Mar 12, 2014 at 08:11:26AM -0700, Paul Goyette wrote: > >>Me, too. But I'd rather that we had the equivalent ISCLR() macro, too, > >>to remove another negation/complement. > > > >So is ISCLR when passed two bits true if both are clear, or if it's just > >not the case that both are set? > > > >Arguably this points out that the ISSET docs should explain about using > >2 bits at once. > > Or might we need ISANYCLR() vs ISALLCLR() (technically, AREALLCLR() > but that's just an English grammar nit!) > > :)
By the time you finish with that you just have an alternate and less legible expression syntax... If it were me I'd rewrite the offending code to not use flag bits at all - bitfields generate equally good code in modern compilers and are much less likely to cause confusion. -- David A. Holland dholl...@netbsd.org