Boost logo

Boost-Commit :

From: arseny.kapoulkine_at_[hidden]
Date: 2007-08-05 16:29:41


Author: zeux
Date: 2007-08-05 16:29:35 EDT (Sun, 05 Aug 2007)
New Revision: 38464
URL: http://svn.boost.org/trac/boost/changeset/38464

Log:
Fixed GCC warning and GCC unit test in release (some weird optimization error)
Text files modified:
   sandbox/SOC/2007/bigint/libs/bigint/test/number_conversion.cpp | 8 +++++---
   1 files changed, 5 insertions(+), 3 deletions(-)

Modified: sandbox/SOC/2007/bigint/libs/bigint/test/number_conversion.cpp
==============================================================================
--- sandbox/SOC/2007/bigint/libs/bigint/test/number_conversion.cpp (original)
+++ sandbox/SOC/2007/bigint/libs/bigint/test/number_conversion.cpp 2007-08-05 16:29:35 EDT (Sun, 05 Aug 2007)
@@ -117,8 +117,10 @@
                 values[ARRAY_SIZE(values) - 1] += 4294967295u;
 
                 // testing unit tests
- BOOST_CHECK(values[0] < 0 && values[0] - 1 > 0); // underflow
- BOOST_CHECK(values[ARRAY_SIZE(values) - 1] > 0 && values[ARRAY_SIZE(values) - 1] + 1 < 0); // overflow
+ BOOST_CHECK(values[0] < 0);
+ BOOST_CHECK(values[0] - 1 > 0); // underflow
+ BOOST_CHECK(values[ARRAY_SIZE(values) - 1] > 0);
+ BOOST_CHECK(values[ARRAY_SIZE(values) - 1] + 1 < 0); // overflow
                 BOOST_CHECK_EQUAL(values[0] - 1, values[ARRAY_SIZE(values) - 1]);
                 
                 // large values
@@ -141,7 +143,7 @@
                 values[ARRAY_SIZE(values) - 1] += 4294967295u;
 
                 // testing unit tests
- BOOST_CHECK_EQUAL(values[ARRAY_SIZE(values) - 1] + 1, 0); // overflow
+ BOOST_CHECK_EQUAL(values[ARRAY_SIZE(values) - 1] + 1, static_cast<boost::uint64_t>(0)); // overflow
                 
                 // large values
                 test_number_ctors<I>(values, ARRAY_SIZE(values));


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk