Wine code comments

Frédéric Delanoy frederic.delanoy at
Sat Jun 5 01:41:10 CDT 2010

On Sat, Jun 5, 2010 at 05:38, James McKenzie <jjmckenzie51 at>wrote:

> John Voltz wrote:
>> Hi everyone,
>> I have a question about comments in the Wine code. I noticed while
>> tracking down a bug that a lot of the code comments are using the
>> block comment marker /*. This is a royal pain when trying to comment
>> out large sections of code where there are a bunch of /* foo */
>> comments. Why is this allowed? Is there are way around it without
>> having to change them all to //?
> Simple answer:  We use 'c' comment convention because some compilers choke
> on the C++ style.
> You could use #if (0) and should use this to mark out possible locations
> for buggy code as it was noted elsewhere.  Using /* and */ is not good
> coding practice to comment out code.
>  James McKenzie

> (E. Hoover)
>Particularly, the section entitled "Avoid C++, C99 and non-portable C

Actually, aside from debugging functions, and stuff in headers files, "if
(0)" would be more portable than "#if 0", with the additional advantage that
it leads to less code rot, since obsolete code tends to be deleted earlier,
and not simply forgotten.

Besides, it shouldn't incur any runtime penalty, since "if (0)" blocks are
typically discarded at compile time.

What do you think about it?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the wine-devel mailing list