On 07-Jul-00 Jason R Thorpe wrote:
> On Fri, Jul 07, 2000 at 07:07:50PM +0900, [EMAIL PROTECTED] wrote:
> > do we still need _DIAGASSERT()? i'm not sure if they are maintained
> > any longer... jhb does not seem to have checked the history of it BTW.
> Yes, if Mr. Baldwin had done his homework, rather than make an insulting
> and uninformed comment on a public FreeBSD mailing list, he would have
> discovered that _DIAGASSERT() performs a very different role than the
> standard assert(). That's why it's in the implementation namespace (and
> used only in system libraries).
I do believe I let my sarcasm exceed the allowable boundary in my e-mail. :(
I had noticed that _DIAGASSERT was conditional on _DIAGNOSTIC and that it
called __diagassert() rather than __assert(), but failed to dig around
enough to ascertain the differences between those functions.
> They are designed to catch bugs in non-library code when the library
> is specifically compiled to do such checks. We went through all this
> before, and it is *inappropriate* for those checks to be ASSERT/assert
> for shipped libraries.
> It's *intended* that they expand only when the library is compiled
> with -D_DIAGNOSTIC.
IOW, a way to enable a subset of assertions w/o having to enable all
the normal debugging code I take it then? I can see the benefit in that.
> The goal is to improve the quality if NetBSD's userland code. FreeBSD,
> if they were smart, would adopt the same mechanism. But as can be shown
> by the error message, FreeBSD isn't even doing the basic work like
> building with strict prototype checking (which would have caught the
> missing _DIAGASSERT() in FreeBSD at compile time, rather than at run-time).
By default we do not, no. Although our debugging flags in -current
would have caught this had I used them. Regardless, my apologies for
allowing my sarcasm to come off much rougher than I intended.
> -- Jason R. Thorpe <[EMAIL PROTECTED]>
John Baldwin <[EMAIL PROTECTED]> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.cslab.vt.edu/~jobaldwi/pgpkey.asc
"Power Users Use the Power to Serve!" - http://www.FreeBSD.org/
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message