This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: Rant about ChangeLog entries and commit messages


> I know this document and I think the part on ChangeLog doesn't achieve
> its purpose:
>
> http://www.gnu.org/prep/standards/standards.html#Change-Logs
>
>    Keep a change log to describe all the changes made to program source
>    files. The purpose of this is so that people investigating bugs in the
>    future will know about the changes that might have introduced the bug.
>    Often a new bug can be found by looking at what was recently changed.
>    More importantly, change logs can help you eliminate conceptual
>    inconsistencies between different parts of a program, by giving you a
>    history of how the conflicting concepts arose and who they came from.

Could you elaborate?

> When you fix a bug by changing a constant (for example if there has been
> an offset by one error or, as I did a few minutes ago in
> config/sh/sh.md, there was an error in the argument to consider), this
> doesn't always mandate a comment in the code. For example, I think a
> description such as the one I wrote when describing the problem
>
>    cmpgeusi_t splitting code compares operand 0 to 0, while this constant
>    value can only be in operand 1. When compiling the Ada runtime, this
>    leads to a "cmp/hs #0,r7" instruction which is not valid as "cmp/hs"
>    operands must be two registers.
>
> along with the above change would have been a better commit message than
> just
>
>     gcc/
>         * config/sh/sh.md (cmpgeusi_t): Fix condition.
>
> which I used as suggested.

Not really in my opinion, it's a trivial fix and totally unrelated to Ada in 
itself, "Fix typo" or "Fix obvious mistake" would have been just fine too.

-- 
Eric Botcazou


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