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: jdorje@xxxxxxxxxxxxxxxxxxxxx
Cc: Freeciv-Dev <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: warnings when compiling with NDEBUG (PR#1216)
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 3 Feb 2002 00:19:44 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Sat, Feb 02, 2002 at 03:07:20PM -0500, Jason Short wrote:
> Raimar Falke wrote:
> 
> > On Wed, Jan 09, 2002 at 03:04:17PM -0800, jdorje@xxxxxxxxxxxxxxxxxxxxx 
> > wrote:
> 
> > Why these changes? I would understand:
> > 
> > "#ifndef NDEBUG" but not "#ifdef DEBUG".
> 
> I'm not really knowledgeable about autoconf, but what is the difference 
> between these two?  Doesn't NDEBUG <=> !DEBUG ?  Or are there three 
> choices: NDEBUG, <nothing>, and DEBUG?

This has to do nothing with autoconf per se but with the freeciv's
configure.in:

if test "x$enable_debug" = "xyes"; then
  test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
  CPPFLAGS="$CPPFLAGS -DDEBUG"
else
  if test "x$enable_debug" = "xno"; then
    CPPFLAGS="$CPPFLAGS -DNDEBUG"
  fi
fi

So yes there can be NDEBUG, <nothing> (the default) and DEBUG.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "How about the new language C&? No, that's not 'c ampersand', 'c reference', 
  'reference to c' or 'c and'. It's pronounced 'campersand', to confuse the 
  hell out of people who are unfamiliar with it, and it will, of course, 
  have no pointers."
    -- Xazziri in comp.lang.c++ about C#


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