[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Help with create_pipe_bidi
From: |
Joel E. Denny |
Subject: |
Re: Help with create_pipe_bidi |
Date: |
Sat, 5 Sep 2009 19:32:35 -0400 (EDT) |
User-agent: |
Alpine 1.00 (DEB 882 2007-12-20) |
On Fri, 4 Sep 2009, Akim Demaille wrote:
> Le 4 sept. 09 à 03:23, Eric Blake a écrit :
> > Fine with me to change that. The coreutils package now uses more asserts
> > than back when Paul gave his opinion 3 years ago, but it also uses the
> > gnulib module assert which makes it very easy to call ./configure
> > - --disable-asserts, which, like you said, disables all asserts rather
> > easily.
Actually, I think Paul said that. :)
> I feel uncomfortable with the fact that aver is silent, so I'd prefer that
> aver == assert in !NDEBUG mode, and becomes the original aver implementation
> otherwise. Something like:
>
> /* <assert.h>'s assertions are heavyweight and can be disabled too
> easily, but deliver more information on failure. So use aver. See
> discussions at
> <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00080.html>
> <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00111.html>.
> */
> #if defined NDEBUG
> static inline void
> aver (bool assertion)
> {
> if (! assertion)
> abort ();
> }
> #else
> # include <assert.h>
> # define aver assert
> #endif
So how useful would --disable-asserts be for Bison? Is our goal to hide
these debugging messages from the end user but not really remove the
run-time cost? If not, then maybe aver should just implement assert
without allowing NDEBUG to affect it.