Arkady V.Belousov wrote:
Hi!
17-Янв-2005 18:34 [EMAIL PROTECTED] (Kenneth Davis) wrote to [EMAIL PROTECTED]:
tc debug build fix
+++ task.c 17 Jan 2005 18:34:10 -0000 1.44.2.5
-#if DEBUG
+#ifdef DEBUG
______________O\_/_________________________________\_/O______________
#if TST
# error 1
#endif
_____________________________________________________________________
O/~\ /~\O
______________O\_/_________________________________\_/O______________
bcc -c -DTST tst.cppBorland C++ Version 3.1 Copyright (c) 1992 Borland International
Error t.cpp 1: Expression syntax
Fatal t.cpp 2: Error directive: 1 *** 2 errors in Compile *** _____________________________________________________________________ O/~\ /~\O
Fix:
#if TST+0 -------^^
PS: I don't understand, what the trouble was with debugging? Old code was
includes conditional part when DEBUG is defined, new code includes code only
when DEBUG is defined AND not zero. Ie. -DDEBUG now not enough to include
those conditional part.
I'm confused. How does #ifdef DEBUG (the new code) require DEBUG to be defined and not zero?
The issue here is that when I converted an #if 1 to be debug only
code I forgot to change the #if to #ifdef.
On a tangential [only slightly related] note, for debug code I want in the source but
almost never compiled (something that helped track down a specific issue, but
generally not needed for a debug build), should I used
#ifdef DDEBUG ... #endif
or simply
#if 0 ... #endif
or
#ifdef <?? suggestions ??> ... #endif
Thanks, Jeremy
------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Freedos-kernel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freedos-kernel
