On 07/27/2011 04:21 PM, Stefan Weil wrote:
NDEBUG is normally set automatically for production code,
and it disables assertions which is not always good.

Assertions are useful even in production code unless
you are sure that the code is bug free or the assertions
cost to much resources - either memory or execution time.

I don't think this is the case for QEMU, therefore I'd prefer
having assertions in production code, too. This simply
means undefining NDEBUG before including assert.h.

I don't know what constitutes "production builds" but the software that most people use in production (normal distributions packages) don't define NDEBUG.

Regards,

Anthony Liguori


Regards,
Stefan



Reply via email to