This is the mail archive of the 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: patch: morpho ms1-elf support

> But that's something very different!  The code *inside* a function
> describes the *implementaiton* of a function while the code
> *outside* describes the *specification* of the function.  Very
> different things!

The implementation-independent specification for most functions is
fully documented in tm.texi.

> You can contribute the reason you wrote the function, meaning what
> it's supposed to do.

/* I added this empty function so that I could link cc1.  */

Remember, we're talking about target ports.  Most of the functions'
purposes are the same from port to port, and fully documented in
tm.texi.  And, unfortunately, that comment is very accurate for my
style of writing target ports.

> If, on the other hand, the comment says:
> /* This function returns true if the operand represents an extra constraint
>    (currently just 'S').  */
> then it's completely clear that the function (and comment) need modifying.

I'm certainly not arguing against misleading comments, but
given this:

	bool m32c_extra_constraints_p (...)

anyone who is (1) investigating a gcc target backend, and (2) can't
figure out that "m32c_extra_constraints_p" is a predicate for m32c's
extra constraints, probably isn't ready to be trying to understand gcc
backends just yet ;-) At least, not until they read the documentation
for EXTRA_CONSTRAINTS_P().  If they still can't figure it out after
that, no amount of commenting is going to help them.

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