[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bison c++ compile
From: |
Paul Eggert |
Subject: |
Re: bison c++ compile |
Date: |
Fri, 20 Jan 2006 10:40:19 -0800 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) |
Akim Demaille <address@hidden> writes:
> Any reason not to use assert in these? ISTR that the GCS don't
> recommend it, but still, that's cuter.
Well, now that you asked....
I prefer 'abort' to 'assert'. It's too tempting for installers to
turn off assertion-checking by compiling with -DNDEBUG. If we think
extra runtime checks are advisable, then we shouldn't let these checks
be disabled so easily.
I far prefer 'verify' to either 'abort' or 'assert', since 'verify'
has no run-time cost and nobody will want to turn it off. But we
can't always use 'verify'.
Currently we use 'abort' almost everywhere, but use 'assert' in only a
few places. I hope nobody would object if I removed the existing uses
of 'assert' and replaced them with 'abort'? We can always say that
the GNU Coding Standards made us do it....