Garbage deletion

Joseph S. Myers jsm28@cam.ac.uk
Sat Jun 28 22:13:00 GMT 2003


On Sat, 28 Jun 2003, Colin Douglas Howell wrote:

> I assume that there shouldn't be any questions about whether an "#if 0"
> block is garbage, provided that its old enough, since it will be unused
> regardless of the compilation circumstances.

The question in general is whether it is complete garbage, or whether it 
should be replaced by a comment.  If it says

#if 0 /* We don't do things this way because ... */

then you may want to keep some form of the comment (if necessary expanded
to be meaningful in the absence of the code, or writing a new one).  But 
changed circumstances or changes in surrounding code may mean that one 
would be unlikely to think of doing things the way the #if 0 code does, in 
which case complete removal would be appropriate.

Occasionally checking history in the old gcc2 repository (available as
old-gcc on gcc.gnu.org) may be useful, but generally what's relevant is an
evaluation of the current relevance of the code rather than its history.

-- 
Joseph S. Myers
jsm28@cam.ac.uk



More information about the Gcc mailing list