This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: NDEBUG
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: "David Rasmussen" <pinkfloydhomer at yahoo dot com>
- Cc: <gcc at gcc dot gnu dot org>
- Date: 11 Jan 2002 23:57:09 -0200
- Subject: Re: NDEBUG
- Organization: GCC Team, Red Hat
- References: <00d001c19afe$4a602470$0c5f26c0@AMADEUS2>
On Jan 11, 2002, "David Rasmussen" <pinkfloydhomer@yahoo.com> wrote:
> How come NDEBUG is never defined with gcc? Shouldn't it be defined when
> compiling with -O3 at least?
Assertion checking is often a good idea, even if you're optimizing the
code. There's no reason to tie -DNDEBUG to any optimization flag; if
you mean to disable assertions, doing it is as simple as adding
-DNDEBUG to the command line.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me