Re: C++, assert and NDEBUG

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

 



On Sat, 27 Mar 2010, Steve Searle wrote:

I have started using autotools for the C++ applications I create (very
much as an amateur). I typically use assert statements during
development, and would disable these by using -DNDEBUG when the release
version is built. How should I configure things so that when a user
installs from the tarball they compile by default with the -DNDEBUG
option?

Do you actually see a performance difference from adding -DNDEBUG? In GraphicsMagick (which uses many assertions) I did not see a tangible performance difference so I did not worry about it.

The Autoconf default is already to compile with debug enabled so it seems that leaving assertions enabled by default is also a reasonable default.

Bob
--
Bob Friesenhahn
bfriesen@xxxxxxxxxxxxxxxxxxx, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux