This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Constant folding broken
- To: Andreas Schwab <schwab at issan dot cs dot uni-dortmund dot de>
- Subject: Re: Constant folding broken
- From: Jeffrey A Law <law at upchuck dot cygnus dot com>
- Date: Mon, 17 May 1999 02:20:38 -0600
- cc: egcs-patches at egcs dot cygnus dot com
- Reply-To: law at cygnus dot com
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