Subject: Re: [boost] [warnings] Are warnings acceptable artifacts from builds?
From: Christopher Currie (christopher_at_[hidden])
Date: 2009-09-08 19:24:21
On Tue, Sep 8, 2009 at 2:18 PM, Emil Dotchevski<emildotchevski_at_[hidden]> wrote:
> I think that you assume that the warning is reasonable and easy to
> fix, as with most warnings that could be silenced with casts. A lot of
> times, fixing such warnings is common sense. In that case, just a note
> to the library developer would be enough to have it fixed.
> But you can't generalize from this, to "all warnings should be silenced."
On the other hand, many people work in environments where there is a
local policy that warnings will be treated as errors. If library code
emits warnings, the build breaks and the library is unusable.
The local policy may be unreasonable, but it still hurts the usability
of a library to have warnings. I agree that some compilers will warn
for reasons that seem not worth the trouble it takes to eliminate them
in the code, but by not taking the trouble it potentially eliminates a
class of users from taking advantage of the library authors hard work.
That said, I'd be interested in an example of a warning not worth
fixing. I haven't worked with the more draconian compilers in a long
time, and it'd be educational to have a concrete counter-example to
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk