tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: _DIAGASSERT(), noreturn attribute and static analysis



On Fri, May 14, 2010 at 02:51:29AM +0200, Nhat Minh Le wrote:
 > I see... the point was just that AFAIK, this little reasoning should
 > apply to about all static analyzers out there. Some may handle
 > assert() specially, but since _DIAGASSERT() is pretty much
 > NetBSD-specific, there's no chance they'll consider that. So it'd be
 > nice to be able to turn it on/off at will, somehow.

Well, they're all different; anyway, I'd expect that most of them,
including in the long run probably clang too, will want

   #define assert(x) __builtin_assert(x)

or similar, because the fact that the programmer is explicitly
asserting something is a highly useful piece of information.

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index