This works even if the code being turned off contains conditionals, but they must be entire conditionals (balanced #if and #endif).
Conversely,
do not use #if0
for comments which are not C code. Use the comment delimiters /*
and */
instead. The interior of #if0
must consist of complete tokens; in particular, single quote characters
must balance. But comments often contain unbalanced single quote characters
(known in English as apostrophes). These confuse #if0.
They do not confuse /*.