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: c-gimplify.c:gimplify_decl_stmt


On Sun, 2004-06-06 at 12:07, Richard Kenner wrote:
>     > The comments in front of the funciton reference variables inside the
>     > function, which is wrong.
> 
>     I don't know that this is "wrong" as long as it's useful. Describing the
>     algorithm or high level stuff that's needed to understand the function.
> 
> No, it's confusing.
> 
> Comments *before* the function are supposed to explain the *specification*
> of the function, which means what a *caller* of the function needs to know.
> 

I disagree. There's nothing at all wrong with describing the function
itself and what it does and how it works. I've just taken a look at the
comment and it does appear to be split along specification and
description boundaries. Seems very useful to me. I've often wanted this
for other functions. Also, it seems a good way to keep functions small
and to the point - otherwise we get fold (). :)

-eric

-- 
Eric Christopher <echristo@redhat.com>


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