From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: Jim Blandy Cc: Eli Zaretskii , gdb-patches@sources.redhat.com Subject: Re: PATCH: minor cleanup to dwarf2read.c Date: Wed, 04 Jul 2001 09:30:00 -0000 Message-id: <3B434498.2050003@cygnus.com> References: X-SW-Source: 2001-07/msg00044.html > I meant something like this: >> >> /* The while loop below was originally this: >> >> while ((unsigned int) (info_ptr - dwarf_info_buffer) >> ((info_ptr - dwarf_info_buffer) % 4) < dwarf_info_size) >> >> This seems to be trying to round info_ptr up to the next >> four-byte boundary, but that's not what it actually did. If we >> discover the problem the old code was really trying to address, >> we can fix it properly. */ >> > > > Right. While I understand (and completely agree with) the principle > that explanatory comments belong in the code and not in the ChangeLog > entry, in this case, I think no comment is necessary. In fact, > something like the above would (I believe) inhibit understanding of > the code, because it suggests that a perfectly straightforward loop is > actually doing something odd and subtle. Here I think Eli's comments are correct and important. There should be a comment explaining what the code was and why it was reverted. Only that way can you ensure that a later (or even the original) party doesn't come through and revert the reverted. enjoy, Andrew