Rant about ChangeLog entries and commit messages

Richard Kenner kenner@vlsi1.ultra.nyu.edu
Mon Dec 3 04:03:00 GMT 2007


> 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!



More information about the Gcc mailing list