[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Lilypond-auto] Issue 2550 in lilypond: Statements that cannot be ex
From: |
lilypond |
Subject: |
Re: [Lilypond-auto] Issue 2550 in lilypond: Statements that cannot be executed may be in the code |
Date: |
Wed, 30 May 2012 15:35:53 +0000 |
Comment #4 on issue 2550 by address@hidden: Statements that cannot be
executed may be in the code
http://code.google.com/p/lilypond/issues/detail?id=2550
Worst of two worlds. Either error can return, then you should write
if (strict_infinity_checking)
error ...
else
warning ...
return "0.0";
Or it can't return, then you can write
if (strict_infinity_checking)
error ...
warning ...
return "0.0"
When in doubt, pick variant 1. But it is pointless to use an "else" path
if you get undefined behavior for drop-through from the if-part.