This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: -Werror policy
- From: Yury Gribov <y dot gribov at samsung dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: Roland McGrath <roland at hack dot frob dot com>, libc-alpha at sourceware dot org
- Date: Tue, 25 Nov 2014 21:04:16 +0300
- Subject: Re: -Werror policy
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot DEB dot 2 dot 10 dot 1411132331520 dot 5050 at digraph dot polyomino dot org dot uk> <20141114001831 dot 8C7CF2C3B16 at topped-with-meat dot com> <alpine dot DEB dot 2 dot 10 dot 1411140028450 dot 5050 at digraph dot polyomino dot org dot uk> <20141124221810 dot 391AC2C3B20 at topped-with-meat dot com> <alpine dot DEB dot 2 dot 10 dot 1411242313250 dot 11608 at digraph dot polyomino dot org dot uk> <20141124235522 dot D37652C3AC8 at topped-with-meat dot com> <alpine dot DEB dot 2 dot 10 dot 1411250013120 dot 11608 at digraph dot polyomino dot org dot uk> <20141125001531 dot 2A8942C3ADB at topped-with-meat dot com> <alpine dot DEB dot 2 dot 10 dot 1411250028130 dot 11608 at digraph dot polyomino dot org dot uk> <5474BF6D dot 6090707 at samsung dot com> <alpine dot DEB dot 2 dot 10 dot 1411251744250 dot 18401 at digraph dot polyomino dot org dot uk>
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