This is the mail archive of the
mailing list for the GCC project.
Re: patch: morpho ms1-elf support
- From: DJ Delorie <dj at redhat dot com>
- To: kenner at vlsi1 dot ultra dot nyu dot edu
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 5 Jul 2005 22:31:33 -0400
- Subject: Re: patch: morpho ms1-elf support
- References: <10507060214.AA01563@vlsi1.ultra.nyu.edu>
> 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
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.