Document difference between g_assert() and g_assert_*() wrt G_DISABLE_ASSERT
@egmontkob
Submitted by Egmont Koblinger Link to original bug (#741732)
Description
There exists a macro G_DISABLE_ASSERT which, when defined, causes g_assert() and g_assert_not_reached() to be eliminated from the build, with the intent that the final stable build of an app is not polluted with these development/debugging statements.
There are extended versions of these methods, such as g_assert_cmpint(), with the intent that when an assertion fails, the actual vs. expected values can also be printed, rather than just purely stating that it failed.
However, defining G_DISABLE_ASSERT leaves the g_assert_cmpint() and friend macros intact, they will remain in the build.
I see no point in this behavior, I believe the right approach would be if all the g_assert_* macros shortcut to no-op in presence of G_DISABLE_ASSERT.
(I understand such a change might breaks apps which define G_D_A and have expressions with side effects inside a g_assert_something(), but I hope such a change is acceptable for the next stable series.)