Replacement of "#if 0" by "if (0)" blocks

Frédéric Delanoy frederic.delanoy at gmail.com
Sun May 30 12:29:35 CDT 2010


Hi folks,

after seeing aafef7cdd56e488d2f42eb01190e51ce6148b664 (Use if(0)
instead of #if 0 to make sure code still compiles),
IMHO, except special cases (like maybe in headers files), those '#if
0' have no advantages compared to "if (0)" (besides
being highlighted in vim), because they may induce code rot and hence
prevent maintenance (and why not delete them to begin with?)...

I'm looking at the remaining cases, and have some questions:
- should this situation be changed/cleaned up (I wouldn't want to
spend time only to see my patches automatically refused...)?
Are there any reasons for those #if blocks other than easier commenting?
- if yes, is it preferable to (1) delete those sections or (2) replace
them with "if" blocks (and delete them if they don't compile?)?

Frédéric



More information about the wine-devel mailing list