[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C++, assert and NDEBUG
From: |
Bob Friesenhahn |
Subject: |
Re: C++, assert and NDEBUG |
Date: |
Sat, 27 Mar 2010 11:50:37 -0500 (CDT) |
User-agent: |
Alpine 2.01 (GSO 1266 2009-07-14) |
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
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
- C++, assert and NDEBUG, Steve Searle, 2010/03/27
- Re: C++, assert and NDEBUG,
Bob Friesenhahn <=
- Re: C++, assert and NDEBUG, Rhys Ulerich, 2010/03/27
- Re: C++, assert and NDEBUG, Braden McDaniel, 2010/03/28
- Re: C++, assert and NDEBUG, William Pursell, 2010/03/29