Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-04-11 08:54:04


From: "Geurt Vos" <G.Vos_at_[hidden]>

> I don't think you're really being realistic here. I mean,
> _you_ don't ignore them, _I_ don't ignore them, but that's
> still not the majority.

Perhaps, but

boost::function<void, int> f(g); // 1

and

g(1); // 2

are exactly equivalent in terms of the compiler warnings that they produce;
so if an user is likely to ignore the warning in (1) he/she will also ignore
it in (2).

> Besides that, there's no warning when GCC (2.95.2) is used,
> which should cause some concern...

Yes, you are right, however GCC doesn't warn about (2), either.

> [sidenote:
> I never use MSVC at level 4, because it results in way too many
> warning in MS's code, and also generates quite some redundant
> warnings, such as "unreferenced inline function has been removed"
> ]

I used to use

#if defined(_MSC_VER) && !defined(__ICL)
#pragma warning(disable: 4786) // identifier truncated in debug info
#pragma warning(disable: 4710) // function not inlined
#pragma warning(disable: 4711) // function selected for automatic inline
expansion
#pragma warning(disable: 4514) // unreferenced inline removed
#endif

#ifdef _MSC_VER
#pragma warning(push, 3)
#endif

#include <iostream>

#ifdef _MSC_VER
#pragma warning(pop)
#endif

The new VC 7 library is relatively clean at level 4 (at last!)

--
Peter Dimov
Multi Media Ltd.

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk