On Thu, 14 Apr 2022 at 13:00, Giovanni Mascellani gmascellani@codeweavers.com wrote:
From the point of view of the compiler, assert(0) is not really different from vkd3d_unreachable(NULL): nothing tells the compiler that control will never ever reach it; if it happens, the compiler will print a message and abort(). The advantage of vkd3d_unreachable() is that the compiler won't try to tell you "Hey, you didn't write your return statement!" in places where it doesn't make any sense (because it's marked "noreturn").
For what it's worth, note that assert() is effectively compiled out when NDEBUG is defined.