|
Boost : |
Subject: Re: [boost] Are warnings acceptable artifacts from builds?
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2009-09-11 15:06:08
Emil Dotchevski wrote:
> On Fri, Sep 11, 2009 at 11:31 AM, Stewart, Robert
> <Robert.Stewart_at_[hidden]> wrote:
>
> > Disabling a warning, provided the scope is controlled, is fine.
>
> Yes, but with GCC you can't control the scope.
Right. That's a failing of GCC as far as I'm concerned.
> > A company may craft a warnings policy, used whenever building code,
> > that always disables select warnings, too, but that doesn't
> > violate the zero warnings policy.
>
> My point exactly. This confirms that it is preferable, for that
> company, to disable some warnings instead of "fixing" them.
Disabling some warnings *is* the appropriate fix and I've never claimed otherwise.
> This in turn leads to another interesting question: why don't they fix
> such warnings anyway? After all, that's what they're asking library
> developers to do for them, right? At least in some cases, I'm sure,
> the answer is "because that would do more harm than good" (as far as
> this particular company is concerned.)
If there is no good way to change the library code to prevent some particular warning from a compiler, then that should be documented and user's should be told that it can be silenced only by disabling that warning. I've never suggested the need to do more in that case.
If there *is* a way to change the library code to prevent a warning, then it is reasonable to want the library author/maintainer to do so.
> Therefore, if a library developer "fixes" a warning, some companies
> would consider that helpful, and some would consider it harmful
A change to the library code to silencing a warning would never be considered harmful unless it broke backward compatibility -- which Boost doesn't guarantee -- or it introduced a bug. The latter is a risk, of course, with any change, but should be vetted quickly enough.
_____
Rob Stewart robert.stewart_at_[hidden]
Software Engineer, Core Software using std::disclaimer;
Susquehanna International Group, LLP http://www.sig.com
IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk