This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Rant about ChangeLog entries and commit messages
> Having said that, I find the lack of rationale for some changes to be a
> bit irritating. I know that this should be done through code comments,
> but those are often made across the changeset and in different files.
And it's often not appropriate to put the reason (or even nature) of the
change in comments because you run the risk of creating what is essentially
a useless monologue to somebody trying to understand the present code:
/* Extract the two operands of the expression. Note that at one point
this code had a typo and extracted the same operand twice.
Paul tried to fix it on February 10, 1997, but actually
introduced another bug where it again extracted the same operand
twice, but this time the other operand. Jeff finally got it
right on February 12, 1997 and that's the present code. */
op0 = TREE_OPERAND (t, 0);
op1 = TREE_OPERAND (t, 1);
That's not very useful!