Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2002:
[Freeciv-Dev] Re: warnings when compiling with NDEBUG (PR#1216)
Home

[Freeciv-Dev] Re: warnings when compiling with NDEBUG (PR#1216)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Freeciv-Dev <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: warnings when compiling with NDEBUG (PR#1216)
From: Eric E Moore <e.e.moore@xxxxxxxxxxxxxxx>
Date: Tue, 05 Feb 2002 16:56:53 +0000

Reinier Post <rp@xxxxxxxxxx> writes:

> No, the gist of it is that DEBUG is *not* !NDEBUG, but instead, is used
> as an integer for debug levels used in explicit #ifs in the code, while
> NDEBUG has the specific, ANSI-mandated function to turn assert()s off.
> Something like
>
> #define NDEBUG (DEBUG < DEBUG_LEVEL_FROM_WHICH_WE_WANT_ASSERTS)
>
> seems reasonable, but I haven't found anything that mandates or
> advises this.

Err... no.  if NDEBUG is defined (regardless of value) asserts are
turned off.

  -Eric


[Prev in Thread] Current Thread [Next in Thread]