
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Dave Abrahams Sent: Tuesday, August 31, 2010 5:46 AM To: boost@lists.boost.org Subject: Re: [boost] Towards a Warning free code policy proposal
On Mon, Aug 30, 2010 at 10:55 PM, Andrey Semashev <andrey.semashev@gmail.com> wrote:
My point is that the warning-free requirement (at high levels) seems quite specific and, to my mind, quite pointless. Additionally, suppressing all warnings in all Boost headers is (a) compiler-specific, (b) tedious and (c) may not be what the user actually wants. Therefore let the users decide what and how to do about warnings.
I think this is really, really unhelpful. And I think there is enough opinions and evidence that getting rid of warnings makes the code better. So many, perhaps most, people (if not all) believe getting 'warnings free' remains a good objective.
Here's my suggestion:
* We make no requirement on developers that they address warnings We do this now.
* We choose a warning level we're going to test at for each compiler We do this now - but I'd like to see it at W all.
* On our testing pages we publish the number of warnings for each test along with the number of errors We (someone) could do this, but it might be some work to get a warnings count on all systems? (We might more easily be able to get a count != 0).
(But I note that many warnings arise from libraries when they are used by other libraries, for example Boost.Format and Fusion used by Boost.Math. This makes warnings count much less useful) .
* On our guidelines page we publish a list of safe ways to "avoid". various warnings (e.g. use implicit conversions) and perhaps less-safe ways to "suppress" them (e.g. use a cast).
We already have quite a lot on this at https://svn.boost.org/trac/boost/wiki/Guidelines/WarningsGuidelines (but more expert input/correction/improvement is very welcome. You can edit it, or I will handle the editorial bit if that is easier). Paul --- Paul A. Bristow, Prizet Farmhouse, Kendal LA8 8AB UK +44 1539 561830 07714330204 pbristow@hetp.u-net.com