[Top][All Lists]

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

Re: suppress_checking

From: Juanma Barranquero
Subject: Re: suppress_checking
Date: Tue, 23 Oct 2007 12:59:06 +0200

On 10/23/07, Richard Stallman <address@hidden> wrote:

> Since eassert uses CHECK, this offers the possibility to turn off
> eassert checking at run time.

Yes, that's why I said that I understood it could be useful when
debugging. My question was more like "it was put there *for*
debugging, or left by accident?". Because if it is intended for
debugging, a comment in the code would've been nice :)

> suppress_checking is implemented in a funny way: the expression to be
> tested is computed and then ignored.  That would make sense if we were
> concerned about function calls and side effects in the expression to
> be tested.  However, if there were any, ENABLE_CHECKING would not work.
> So we may as well test suppress_checking first.

AFAICS, the !ENABLE_CHECKING version of CHECK does evaluate (check)
too, so the side effects are intended.

On the other hand, the !ENABLE_CHECKING version of CHECK is not used
anywhere. CHECK is only used in eassert (in lisp.h) and
NULL_INTERVAL_P (in intervals.h), and always when ENABLE_CHECKING is


reply via email to

[Prev in Thread] Current Thread [Next in Thread]