[Freeciv-Dev] Re: [patches] freeing NULL ptrs
[Top] [All Lists]
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
 
Ross W. Wetmore <rwetmore@xxxxxxxxxxxx> wrote:
> assert is a void function and so can only be put in code blocks as
> opposed to expressions. But a divide by zero can do the same thing
> in an expression.
> 
> These should be tied to NDEBUG to stop the proliferation of control
> variables. NDEBUG should be set on release versions and friendlier
> actions taken as alternate codepaths.
> 
> I.E. the solution is already there and just needs to be used.
I agree.  I've run into bugs where there was code in the assert() that
had side effects, but I can't find any in the 1.12.0 code (mine was
merely a cursory examination, however).
Not only that, but setting NDEBUG for releases will help us uncover
such bugs more easily in the future.  :-)
-- 
Kevin Brown                                           kevin@xxxxxxxxxxxxxx
    It's really hard to define what "unexpected behavior" means when you're
                       talking about Windows.
 
[Freeciv-Dev] Re: [patches] freeing NULL ptrs, David Pfitzner, 2001/08/17
 
 | 
 |