Re: [patch] Code cleanup: Make function typedef for find memory region

Joel Brobecker
2010-08-30T14:58:28Z

> I am also for requiring comment to be placed at the function definition and
> not at its declaration. Using tag jumps one will never find the declaration
> and I have considered these functions to have no comment (randomly found now
> simple_displaced_step_copy_insn, it was a different function I had the problem
> with).

That has been my approach as well, so I'm not the one that needs
convincing. However, proponents of comments with the definition
also have a good point. When you have a nice public API declared
in a .h file, it's convenient to have the documentation there.
I still think that it's better to be consistent in the location
of the documentation, particularly if the names we choose in the API
are clear enough that it gives us a general idea of what each entity
is about. We can then read the comment of the functions of interest.

> I am also for forbidding putting comments there at both places as such way
> they get inconsistent soon or they differ etc. (randomly found init_type).

Agree on that as well.

--
Joel