|
From: | lilypond |
Subject: | Re: Issue 1908 in lilypond: Causes lily to fail during regtests if binary is unoptimized |
Date: | Mon, 19 Dec 2011 10:08:34 +0000 |
Comment #3 on issue 1908 by address@hidden: Causes lily to fail during regtests if binary is unoptimized
http://code.google.com/p/lilypond/issues/detail?id=1908Compiling with -DNDEBUG makes only sense for compiling binaries shipped to end customers that never get to see stderr anyway and that are absolutely space and performance critical.
assert(...) indicates a condition that should never be possible to occur and that the code is not designed to handle.
It is WRONG, WRONG, WRONG to compiled with -DNDEBUG except for extreme deployment conditions where graceful failure is not an option preferable to crashing failure or undefined behavior.
If assertions make GUB fail, they need to be fixed (meaning their cause determined and eliminated), not disabled.
In particular, assertions must still hold when we are optimizing, so it does not make sense to stop checking them.
[Prev in Thread] | Current Thread | [Next in Thread] |