|
Boost : |
Subject: Re: [boost] [Test] reopened trac issues floating comaparison
From: John Maddock (john_at_[hidden])
Date: 2008-12-24 05:22:45
Gennadiy Rozental wrote:
>> Juergen Hunold <juergen.hunold <at> ivembh.de> writes:
>>
>>> There are currently two patches missing:
>>> - attached patch to make operator() of check_is_small and
>>> check_is_close "const". This is needed because Boost.Test now
>>> stores "const&" due those two objects due to the previous applied
>>> ODR-patch. - gcc-4.3 warnings
>>> "../boost/test/floating_point_comparison.hpp:88: warning: suggest
>>> parentheses around && within ||" which are rather annyoing.
>>
>> Is it still an issue with latest trunk?
If anything it's worse:
gcc.compile.c++
..\..\..\bin.v2\libs\math\test\test_zeta.test\gcc-mingw-mw4\debug\test_zeta.o
In file included from
..\..\../boost/test/utils/runtime/cla/typed_parameter.hpp:24,
from
..\..\../boost/test/utils/runtime/cla/basic_parameter.hpp:21,
from
..\..\../boost/test/utils/runtime/cla/named_parameter.hpp:21,
from
..\..\../boost/test/utils/runtime/cla/dual_name_parameter.hpp:21,
from ..\..\../boost/test/impl/unit_test_parameters.ipp:31,
from ..\..\../boost/test/included/test_exec_monitor.hpp:31,
from test_zeta.cpp:8:
..\..\../boost/test/utils/runtime/cla/parameter.hpp: In member function
'bool boost::runtime::cla::parameter::conflict_with(const
boost::runtime::cla::parameter&) const':
..\..\../boost/test/utils/runtime/cla/parameter.hpp:92: warning: suggest
parentheses around && within ||
..\..\../boost/test/floating_point_comparison.hpp: In function 'FPT
boost::test_tools::tt_detail::safe_fpt_division(FPT, FPT) [with FPT =
float]':
..\..\../boost/test/floating_point_comparison.hpp:188: instantiated from
'boost::test_tools::predicate_result
boost::test_tools::close_at_tolerance<FPT>::operator()(FPT, FPT) const [with
FPT = float]'
..\..\../boost/test/floating_point_comparison.hpp:233: instantiated from
'boost::test_tools::predicate_result
boost::test_tools::check_is_close_t::operator()(FPT1, FPT2,
boost::test_tools::percent_tolerance_t<ToleranceBaseType>,
boost::test_tools::floating_point_comparison_type) [with FPT1 = float, FPT2
= float, ToleranceBaseType = float]'
..\..\../boost/test/test_tools.hpp:523: instantiated from 'bool
boost::test_tools::tt_detail::check_frwd(Pred, const
boost::unit_test::lazy_ostream&, boost::test_tools::const_string, size_t,
boost::test_tools::tt_detail::tool_level, boost
::test_tools::tt_detail::check_type, const Arg0&, const char*, const Arg1&,
const char*, const Arg2&, const char*) [with Pred =
boost::test_tools::check_is_close_t, Arg0 = float, Arg1 = float, Arg2 =
boost::test_tools::percent_tolerance_t<float>]'
test_zeta.cpp:165: instantiated from 'void test_spots(T, const char*)
[with T= float]'
test_zeta.cpp:196: instantiated from here
..\..\../boost/test/floating_point_comparison.hpp:92: warning: suggest
parentheses around && within ||
..\..\../boost/test/floating_point_comparison.hpp: In function 'FPT
boost::test_tools::tt_detail::safe_fpt_division(FPT, FPT) [with FPT =
double]':
..\..\../boost/test/floating_point_comparison.hpp:188: instantiated from
'boost::test_tools::predicate_result
boost::test_tools::close_at_tolerance<FPT>::operator()(FPT, FPT) const [with
FPT = double]'
..\..\../boost/test/floating_point_comparison.hpp:233: instantiated from
'boost::test_tools::predicate_result
boost::test_tools::check_is_close_t::operator()(FPT1, FPT2,
boost::test_tools::percent_tolerance_t<ToleranceBaseType>,
boost::test_tools::floating_point_comparison_type) [with FPT1 = double, FPT2
= double, ToleranceBaseType = double]'
..\..\../boost/test/test_tools.hpp:523: instantiated from 'bool
boost::test_tools::tt_detail::check_frwd(Pred, const
boost::unit_test::lazy_ostream&, boost::test_tools::const_string, size_t,
boost::test_tools::tt_detail::tool_level, boost
::test_tools::tt_detail::check_type, const Arg0&, const char*, const Arg1&,
const char*, const Arg2&, const char*) [with Pred =
boost::test_tools::check_is_close_t, Arg0 = double, Arg1 = double, Arg2 =
boost::test_tools::percent_tolerance_t
<double>]'
test_zeta.cpp:165: instantiated from 'void test_spots(T, const char*)
[with T= double]'
test_zeta.cpp:197: instantiated from here
..\..\../boost/test/floating_point_comparison.hpp:92: warning: suggest
parentheses around && within ||
..\..\../boost/test/floating_point_comparison.hpp: In function 'FPT
boost::test_tools::tt_detail::safe_fpt_division(FPT, FPT) [with FPT = long
double]':
..\..\../boost/test/floating_point_comparison.hpp:188: instantiated from
'boost::test_tools::predicate_result
boost::test_tools::close_at_tolerance<FPT>::operator()(FPT, FPT) const [with
FPT = long double]'
..\..\../boost/test/floating_point_comparison.hpp:233: instantiated from
'boost::test_tools::predicate_result
boost::test_tools::check_is_close_t::operator()(FPT1, FPT2,
boost::test_tools::percent_tolerance_t<ToleranceBaseType>,
boost::test_tools::floating_point_comparison_type) [with FPT1 = long double,
FPT2 = long
double, ToleranceBaseType = long double]'
..\..\../boost/test/test_tools.hpp:523: instantiated from 'bool
boost::test_tools::tt_detail::check_frwd(Pred, const
boost::unit_test::lazy_ostream&, boost::test_tools::const_string, size_t,
boost::test_tools::tt_detail::tool_level, boost
::test_tools::tt_detail::check_type, const Arg0&, const char*, const Arg1&,
const char*, const Arg2&, const char*) [with Pred =
boost::test_tools::check_is_close_t, Arg0 = long double, Arg1 = long double,
Arg2 = boost::test_tools::percent_t
olerance_t<long double>]'
test_zeta.cpp:165: instantiated from 'void test_spots(T, const char*)
[with T= long double]'
test_zeta.cpp:199: instantiated from here
..\..\../boost/test/floating_point_comparison.hpp:92: warning: suggest
parentheses around && within ||
..\..\../boost/test/floating_point_comparison.hpp: In function 'FPT
boost::test_tools::tt_detail::safe_fpt_division(FPT, FPT) [with FPT =
boost::math::concepts::real_concept]':
..\..\../boost/test/floating_point_comparison.hpp:188: instantiated from
'boost::test_tools::predicate_result
boost::test_tools::close_at_tolerance<FPT>::operator()(FPT, FPT) const [with
FPT = boost::math::concepts::real_concept]'
..\..\../boost/test/floating_point_comparison.hpp:233: instantiated from
'boost::test_tools::predicate_result
boost::test_tools::check_is_close_t::operator()(FPT1, FPT2,
boost::test_tools::percent_tolerance_t<ToleranceBaseType>,
boost::test_tools::floating_point_comparison_type) [with FPT1 =
boost::math::concepts::real_concept, FPT2 =
boost::math::concepts::real_concept, ToleranceBaseType =
boost::math::concepts::real_concept]'
..\..\../boost/test/test_tools.hpp:523: instantiated from 'bool
boost::test_tools::tt_detail::check_frwd(Pred, const
boost::unit_test::lazy_ostream&, boost::test_tools::const_string, size_t,
boost::test_tools::tt_detail::tool_level, boost
::test_tools::tt_detail::check_type, const Arg0&, const char*, const Arg1&,
const char*, const Arg2&, const char*) [with Pred =
boost::test_tools::check_is_close_t, Arg0 =
boost::math::concepts::real_concept, Arg1 =
boost::math::concepts::real_concept, Arg2 =
boost::test_tools::percent_tolerance_t<boost::math::concepts::real_concept>]'
test_zeta.cpp:165: instantiated from 'void test_spots(T, const char*)
[with T= boost::math::concepts::real_concept]'
test_zeta.cpp:200: instantiated from here
..\..\../boost/test/floating_point_comparison.hpp:92: warning: suggest
parentheses around && within ||
And if I build with -Wall -Wextra then there are even more warnings (see
attached log for that one).
Also please note that I'm probably only using a subset of Boost.Test: so
there may be other issues lurking somewhere :-(
HTH, John.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk