lilypond-devel
[Top][All Lists]
Advanced

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

Re: Issue 2787: Sanitize usage of -DDEBUG, -DNDEBUG and assert (issue 23


From: k-ohara5a5a
Subject: Re: Issue 2787: Sanitize usage of -DDEBUG, -DNDEBUG and assert (issue 236190043 by address@hidden)
Date: Sat, 16 May 2015 18:18:49 +0000

Probably a good idea, if assert() is really used like this.

assert is essentially stating that the program cannot
usefully continue if the assertion is not met

There are uses of assert() where I suspect the output on conditions that
would violate the assertion, would be better than no output at all.

Given that erroneous LilyPond is unlikely to do damage, as it does not
control medical devices or modify databases, erroneous output is
probably more useful than no output.

I think you have dealt with most of the inappropriate uses of assert().
There are a few in 'page-breaking.cc' and 'constrained-breaking.cc' that
might cause trouble, and some floating point comparisons in
'simple-spacer.cc' that might cause trouble on a cross-compile.

We could throw lots of messy *.ly files at a debug build and see if
these break, or decide we've done that enough and let users do it for us
in a development release, to find any remaining inappropriate assert()s.


https://codereview.appspot.com/236190043/



reply via email to

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