Why not just
#define MY_ASSERT(expr) ((void)(false && (expr)))
The problem the do-while idiom is that the macro result is not an expression, so it can’t be used in certain cases.