Here we have

-#define ASSERT_LIVE_IS_ALLOWED()
+#define ASSERT_LIVE_IS_ALLOWED() {};

The problem is that the replaced statement defines
ASSERT_LIVE_IS_ALLOWED() as being 1, while the second defines it as {};.

Now

ASSERT_LIVE_IS_ALLOWED();

was one statement previously, while it now is three(!) statements.

That is a particular bad idea for things like

if (condition) ASSERT_LIVE_IS_ALLOWED(); else ...

While a code review can check that this is not yet problematic, it will
still remain an accident waiting to happen.

So either ASSERT_LIVE_IS_ALLOWED() should be explicitly defined as 1.
Or, if one really wants to stress the statement character, one can use

#define ASSERT_LIVE_IS_ALLOWED() do { } while (0)

which is a common trick to generate a statement that is lacking its
terminating semicolon.

-- 
David Kastrup


_______________________________________________
lilypond-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to