|
Boost : |
From: Giovanni Bajo (giovannibajo_at_[hidden])
Date: 2004-02-18 03:59:56
Boost wrote:
> It would be nice to reduce warning noise
> (provided it is not too much trouble).
If and only if the warning is not bogus. Otherwise, it should be shut off at
compiler level. MSVC is known to produce a few bogus warnings.
For instance, GCC has -Wshadow. If you do that, you can't call a local variable
"int y1;" because it will emit a warning as it shadows "double y1(double)" in
math.h. So what, this is what I meant. I am sure the warning can be useful in
many other contexts, but we can't ask people to fix the code for this.
> Msvc 7.1 (warnings level 4, no language extensions aka strict)
> produces some warning 'noise' at:
>
> const T operator*() const { return l.head(); }
>
> "qualifier applied to function type has no meaning; ignored
>
> A qualifier, such as const, is applied to a function type defined by
> typedef.
See DR295 (http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/cwg_defects.html#295). I
think this warning is bogus.
> However, this is a level 1 warning, so Microsoft obviously believe it
> is wrong C++.
It is, strictly speaking, but there is a DR for it. I'm not sure it's worth a
code fix. pragma warning disable will do it.
-- Giovanni Bajo
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk