Le 20 janv. 06 à 19:40, Paul Eggert a écrit :

Akim Demaille <[EMAIL PROTECTED]> 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.

Well, we can #undef NDEBUG :)

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....

Do as you feel, but note that some of the recent asserts were
abort before I converted them to assert :)


Reply via email to