This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: -Werror policy
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Yury Gribov <y dot gribov at samsung dot com>
- Cc: Roland McGrath <roland at hack dot frob dot com>, <libc-alpha at sourceware dot org>
- Date: Tue, 25 Nov 2014 17:46:40 +0000
- 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>
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. Whether
one comment is or is not adequate for all uses is a matter of human
judgement. And normal code readability indicates putting the multi-line
comment above the macro call rather than embedding it in a macro argument.
--
Joseph S. Myers
joseph@codesourcery.com