From: Paul A. Bristow (boost_at_[hidden])
Date: 2003-10-01 03:15:31
| -----Original Message-----
| From: boost-bounces_at_[hidden]
| [mailto:boost-bounces_at_[hidden]]On Behalf Of Pavel Kuznetsov
| Sent: Tuesday, September 30, 2003 6:11 PM
| To: boost_at_[hidden]
| Subject: [boost] Re: MSVC++ warnings in boost headers (mem_fn.hpp)
| David Abrahams (dave_at_[hidden]) wrote:
| >> warning C4668: '...' is not defined as a preprocessor macro,
| >> replacing with '0' for '#if/#elif'
| DA> It shouldn't *be* a problem in the first place. Undefined symbols
| DA> are supposed to be expanded to 0 in preprocessor comparisons
| DA> according to the standard.
| I agree with your interpretation of the behavior mandated by the
| standard, though of course a compiler is not compromising its conformance
| issuing a warning here.
| DA> This is not an edge case. I think that warning should be turned off.
| Pavel> So now I see these alternatives to keep that warning quiet:
| 1) Require checking whether symbol is defined before using
| BOOST_WORKAROUND. Not that good thing since it compromises the very
| purpose of this macro. Currently involves about 240 replacements in
| about 95 header files across all the boost libraries. Ugh, of course
| nobody will like it.
But I believe that this is the Right Thing To Do. Undefined symbols are a sort
of unitialised variable, and they are never good, even if the standard helps to
hack by making it 0.
Tiresome and tedious, but each author has only a few to do? It is not urgent?
Paul A Bristow, Prizet Farmhouse, Kendal, Cumbria, LA8 8AB UK
+44 1539 561830 Mobile +44 7714 33 02 04
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk