Author Topic: debug macro  (Read 3676 times)

Offline jmccay

  • Almost regular
  • **
  • Posts: 202
debug macro
« on: April 27, 2006, 02:40:19 am »
  How does linux (& windows) handle the debug macro?

#define DEBUG

or

#define _DEBUG

  Is this a defacto standard for g++?

   Also, is there anything that is define automatically when including debugging information?

jmccay
« Last Edit: April 27, 2006, 03:27:24 am by jmccay »
OS: WinXP, Win98 SE, & sometimes Linux

a little light reading from the wxWidgets 2.6.2 readme: A detailed 2000-page reference manual is supplied in HTML, PDF and Windows Help form: see the docs hierarchy.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: debug macro
« Reply #1 on: April 27, 2006, 09:39:51 am »
I don't know about a DEBUG "standard", but there is a NDEBUG "standard".

If you define NDEBUG, then the preprocessor evaluates assert() to nothing (assert is simply a macro).
Everything else is home-made stuff and not standard.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."