Talk:C preprocessor

From OSDev.wiki
Revision as of 15:07, 24 June 2010 by Solar (talk | contribs)

Latest comment: 14 years ago by Solar
Jump to navigation Jump to search

Some of the things I see here I just cannot believe. First, assert() is very well-defined in <assert.h>, and if you want to disable it, you define NDEBUG instead of undefining the macro. typeof() is a GCC extension, using which I hesitate to advertise as "good practice". complain() isn't defined anywhere, and if you replace it with printf() you'll get into trouble because the condition will be interpreted as printf() format string. The alert() function overloading is C++, not C. lnDbg() is ugly as hell, and better done with a debugger anyway. I strongly recommend cleaning up this mess. If you don't, I will, and I won't be mercyful. ;-) -- Solar 14:59, 24 June 2010 (UTC)Reply[reply]

On second thought... was this intended to be a mock page to show why you shouldn't rely on macros (too much)? ;-) -- Solar 15:07, 24 June 2010 (UTC)Reply[reply]