This is the mail archive of the gcc-help@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: Does GCC have any built-in DEBUG preprocessor flags?


Hi Joseph,

Sort of the other way around.

#ifdef NDEBUG
    // We're in RELEASE mode.
#else
    // We're in DEBUG mode.
#endif

The presence of NDEBUG indicates non-debug compile.  q.v. 24.3.7.1 of C++PL.

--Eljay



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