This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: -Werror policy


On 11/25/2014 08:46 PM, Joseph Myers wrote:
On Tue, 25 Nov 2014, Yury Gribov wrote:

What about naming a macro DIAG_PUSH_NEEDS_COMMENT or similar?  (I prefer
that to DIAG_IGNORE_NEEDS_COMMENT to avoid risking the version number
field ending up on a separate line from the DIAG_IGNORE_NEEDS_COMMENT word
and so not being readily greppable for.)

Can't we do a simple check in Makefile to verify that comments are not empty?
I think many projects do something like this to enforce coding policies.

Well, duplicating the same comment many times isn't helpful - if an issue
appears several times, it makes sense to have the comment only on the
first use of the macros, saying that it applies to all the uses.

I'm not sure: the knowledge that error suppression is explained elsewhere is implicit in code. So if e.g. someone works on surrounding code and removes the master comment, all other suppressions will become undocumented. This would be hard to spot during reviews.

> Whether
one comment is or is not adequate for all uses is a matter of human
judgement.

Sure but at least we now force commiters to write something which raises the chance that reviewer will spot bad or inappropriate comment.

> And normal code readability indicates putting the multi-line
comment above the macro call rather than embedding it in a macro argument.

Concrete syntax is not an issue, just throw in more sed.

-Y


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