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


    Right, I was mostly concerned about codifying "all functions must have
    comments" when what we want is "all functions that should have
    comments, have comments".  IMHO the former is detrimental to
    maintenance.

Are you talking about comments within the body of the function or in
front of the function?  If the former, I agree. If the latter, I
disagree.  It is an absolute requirement that every function document
its intention and arguments.

    Or this, which is self-explanatory (given the target's constraint
    documentation):

    int
    m32c_extra_memory_constraint (char c, const char *str ATTRIBUTE_UNUSED)
    {
      return c == 'S';
    }

This could easily use a comment.  But sometimes you do indeed have a bunch
of simple functions that are fairly regular.  So just put a comment saying
"in the next group of functions ...".


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