[Top][All Lists]

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

Re: [aspell-devel] Does Anyone Compile Aspell with -DNDEBUG?

From: Kevin Atkinson
Subject: Re: [aspell-devel] Does Anyone Compile Aspell with -DNDEBUG?
Date: Sun, 1 Jun 2008 16:40:45 -0600 (MDT)

On Sun, 1 Jun 2008, Peter Kümmel wrote:

If this is the case, I don't think I can ever officially support Aspell compiled with msvc. At very least I won't be able to accept bug reports for Windows binary built in release mode. I will expand on the reasons latter if necessary.

I'm very interested in your reasons and especially your experience when
not using NDEBUG in release code, because it's new to me.

1) When writing Aspell I was under the impression that NDEBUG would not be used except by those trying to squeeze the last 1-2% of performance out of Aspell. If they chose to enable NDEBUG than it was at there own risk. Defining NDEBUG for official binaries for Windows violates this assumption.

2) In some cases I use asserts to check non-obvious precondition of functions. I do not want these checks disabled as they are not expensive. These is especially important if the invalid input comes from someone using the library incorrectly.

3) In some cases I am bad and use assert to check for invalid input in several data files which, in general, the user should have no reason to modify directly. I fully agree that these should be cleaned up. But until they do, Aspell may behave mysteriously if it gets an invalid data file and NDEBUG is not defined.

4) I also use NDEBUG in possib_err.hpp. Normally possib_err checks for unhandled errors, with NDEBUG enabled it doesn't. I wrote thus with the assumption in (1).
reply via email to

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