This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Constant folding broken


  In message <vyzr9oppc87.fsf@issan.cs.uni-dortmund.de>you write:
  > See the testsuite patch for a test case.
  > 
  > 
  > 1999-05-08  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
  > 
  > 	* fold-const.c (fold_truthop): When converting a one-bit
  > 	comparison don't sign extend the constant.  The left operand is
  > 	either always unsigned or there is a BIT_AND_EXPR that masks out
  > 	the extension bits.
I installed this patch after making a subtle, but important change.

The comments about the "left operand is either ..." do not belong in the
ChangeLog entry.  They belong as comments in the source.

Think about it and it will make sense.

If someone happens to be debugging this code at some point in the future, are
they more likely to read the comments in the code or spend their time reading
each and every ChangeLog entry that might be related to this code?

A ChangeLog entry indicates what changed, not why.  The "why" belongs in the
sources themselves as comments.


jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]