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: ChangeLog's: do we have to?


* Richard Kenner:

>> GCC ChangeLogs don't record the purpose of the change. They say what changed,
>> but not why.
>
> That depends on how you define "purpose".  Let's take a random entry,
> from a 1999 change of mine:
>
>         * expr.c (expand_expr): If ignoring reference operations,
>         just expand the operands.
>         (expand_expr, case COMPONENT_REF): Refine test for when need
>         to use bitfield operations or pointer punning.
>
> This indeed doesn't say why the change was made (though later policy
> did tend to at least suggest adding PR numbers), but does say, in some
> detail, what was changed.  You can't get that informtion from the current
> state of the code.  You could indeed derive it from the diff itself, but
> that's work and having a short summary is very helpful.

But this is against GNU policy for ChangeLog entries.  Explanations of
the change should go into the source code, as comments.

(Of course, this policy is problematic if you *remove* code.)


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