31 May 2003 abg   » (Journeyer)

I've always written debugging stuff into my C code in the following way:
dprintf (char *, ...) {
#ifdef DEBUG
#endif  /* DEBUG */
and I just assumed that the compiler would see that it's a NOP when not compiled with -DDEBUG and do the appropriate optimizations.
I got into a rather pointless argument the other day with someone over whether or not all calls to this would be removed or if the compiled program would still visit here and waste a few instructions coming here and going back. Now that he has me thinking about it, I should probably investigate...


Been compiling many things for the Z recently, mostly just bringing curses console apps over. My Zaurus pages... Many, many, many thanks to the handhelds.org guys for use of their Public Development Clusters.


Need a haircut.

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!