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 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


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