|
Boost : |
From: Paul A Bristow (boost_at_[hidden])
Date: 2004-03-18 13:35:19
Award yourself a 'bonus point' :-)
This shows how desirable it is from a documentation point of view for
Boost libraries to try to get to an warning free compilation, at the
strictest level if possible.
New (and wise) users are rightly concerned about getting warnings - and
they cause a lot of clutter on the build log.
It has been rightly observed that it is not possible to make a global
judgement on whether warnings are helpful or not, but the Boost authors
should do so.
The way you suggest is fine IMHO. You might like to add a brief
description of what the warning is, and perhaps why it can be ignored.
This may be a benefit to users of other compilers.
# pragma warning(disable: 4511) // Copy constructor could not be
generated.
# pragma warning(disable: 4512) // Assignment operator could not be
generated.
It may be better to use BOOST_MSVC rather than _MSC_VER -
BUT it must follow some Boost included file that will ensure BOOST_MSVC
is defined -
a pit into which I have stumbled :-(
Paul
Paul A Bristow
Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB
+44 1539 561830 +44 7714 330204
mailto: pbristow_at_[hidden]
| -----Original Message-----
| From: boost-bounces_at_[hidden]
| [mailto:boost-bounces_at_[hidden]] On Behalf Of Maciej Sobczak
| Sent: 18 March 2004 12:17
| To: boost_at_[hidden]
| Subject: Re: [boost] VC71 boost.thread 1.31.0 warnings ?!
|
|
| Hi,
|
| Nicolas LELONG / mgdesign wrote:
|
| > I've been successfully compiling boost.thread library (from
| boost 1.31.0) as
| > a DLL with VC71, and I also compile the alarm example which
| seems to work
| > fine, although I get a few warnings during the compilation
| (listed below).
| >
| > Do these warnings have been fixed since 1.31.0 ? Would they
| prevent any
| > "real" app from working ?
|
| As far as I know, they are not something you should be nervous about.
|
| Some time ago I found (I do not remember where) a list of
| warnings that
| are not helpful at all but can be generated when compiling
| modern libs.
| The list of these warnings and the macros I use to shut them up (all
| this is in the header file that I include where needed) are:
|
| // these are the meaningless warnings:
| // 4097 4127 4250 4251 4275 4284 4290 4291 4355 4505 4511
| 4512 4514 4554
| 4706 4710 4786 4800
|
| // for VC++6: _MSC_VER == 1200
|
| # if defined _MSC_VER
| # if (_MSC_VER == 1200)
| # pragma warning (disable : 4097 4251 4275 4284 4355 4511
| 4512 4514
| 4786)
| # endif
| # endif
|
| // for VC++7.1: _MSC_VER == 1310
|
| # if defined _MSC_VER
| # if (_MSC_VER >= 1300)
| # pragma warning (disable : 4251)
| # endif
| # endif
|
|
| I disable only those warnings that were appearing in my compilations
| (so, as you can see, VC++7.1 generates far less warnings than
| VC++6) and
| *only* those from the list above. You may need to modify the
| disable lists.
|
|
| At least I can show the "0 warnings" message to my boss. ;-)
|
| --
| Maciej Sobczak : http://www.msobczak.com/
| Programming : http://www.msobczak.com/prog/
|
| _______________________________________________
| Unsubscribe & other changes:
| http://lists.boost.org/mailman/listinfo.cg| i/boost
|
|
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk