This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: NDEBUG


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]