This is the mail archive of the 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 Mon, 24 Nov 2014, Roland McGrath wrote:

> > > However, I think we should probably write some internal macro using _Pragma
> > > that becomes the idiom rather than the whole push/pop boilerplate.  We
> > > might even make the "mandatory comment" items be (ignored) string arguments
> > > to the macro, so it is quite hard to accidentally fail to supply the
> > > information.
> > 
> > I think string arguments would likely be cumbersome when you have 
> > explanations that may be more than one line long.
> Well, it was just the first thought.  The point is to have something that
> serves as a reminder to write enough commentary.  It doesn't really matter
> how much of the commentary is in an ignored string and how much is in
> nearby comments.  The main thought I was having there is that something
> syntactically mandatory would be more helpful than a mere policy about
> having comments, in making sure we don't let something through review
> absentmindedly without requiring adequate comments to justify the warning
> suppression.

If we let things through without comments, I think they're just as likely 
to go through with unhelpful or empty strings.  Hence my proposed patch 
having an unused argument only for a case where having some information 
inside the macro call rather than elsewhere nearby seems useful (GCC 
version with which the warning was observed, with a view to grepping for 
cases needing review).

Joseph S. Myers

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