[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Removing debug assertions
- From: Rob Kendrick <lua-l@...>
- Date: Thu, 10 May 2007 13:45:18 +0100
David Haley wrote:
> Hi all,
>
> Is there a 'good' way of removing assertions from code at run/compile
> time? I want to keep them around in the source so that I can use them
> for debugging, but I'd also like to turn them off to make things as fast
> as possible (I am testing something for performance). I poked around in
> the mailing list archives and on Google but didn't see anything.
The manpage for assert() here says that defining NDEBUG before
#including assert.h will make assert()s vanish. I believe this to be
pretty standard.
B.