bison-patches
[Top][All Lists]
Advanced

[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: Mon, 7 Sep 2009 14:11:02 -0400 (EDT)
User-agent: Alpine 1.00 (DEB 882 2007-12-20)

Hi Akim.

On Mon, 7 Sep 2009, Akim Demaille wrote:

> I can understand the concerns of Paul wrt the space-footprint of assert,

I'm probably showing my ignorance here, but are we talking about the size 
of the bison executable?  I didn't know what Paul meant by "heavyweight".

On my system, src/bison increases from 988K to 1000K when I adjust 
src/system.h as follows:

  -static inline void
  -aver (bool assertion)
  -{
  -  if (! assertion)
  -    abort ();
  -}
  -
  +#include <assert.h>
  +#define aver assert

After stripping, it's 300K and 312K.  Will anyone be bothered by 12K?

> that's why I meant to twist the meaning of NDEBUG into "smaller foot-print".
> I would make --disable-asserts equivalent to NDEBUG, so it would move from
> classical assert to our current aver.
> 
> We can also provide a three-state --disable-asserts:
> 
> - yes: fully blown assert,
> - no: our current aver, same as NDEBUG,
> - totally: completely remove the assertions.

During development, assert's output could prove helpful.  Also, if a user 
ever sees an assertion failure, it might be nice that he can report the 
assert output to bug-bison.  I can also understand the motivation to 
suppress NDEBUG's effect.  So, assert ignoring NDEBUG seems good to me.  
I don't yet see much motivation for other options, but I'm not opposed to 
bison providing them if you think people would find them useful.




reply via email to

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