Subject: Re: [Boost-bugs] [Boost C++ Libraries] #6126: Signed integer members of Boost.Fusion adapted ADTs are not output correctly with Boost.Spirit.Karma rules
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-01-20 14:57:33
#6126: Signed integer members of Boost.Fusion adapted ADTs are not output
correctly with Boost.Spirit.Karma rules
-------------------------------+--------------------------------------------
Reporter: t0rt1e@⦠| Owner: hkaiser
Type: Bugs | Status: new
Milestone: To Be Determined | Component: spirit
Version: Boost 1.48.0 | Severity: Regression
Resolution: | Keywords: patch proposed, Boost.Spirit.Karma, Boost.Fusion, BOOST_FUSION_ADAPT_CLASS, BOOST_FUSION_ADAPT_ADT, short, int, long
-------------------------------+--------------------------------------------
Comment (by t0rt1e@â¦):
I just tried to compile
{{{test_signed_integer_output_with_karma_minimal.cpp}}} with {{{g++ 4.7.0
20120114 (experimental)}}} from !MacPorts against Boost trunk (svn rev.
76591). Compilation succeeds, but running the test gives still completely
wrong output depending on the chosen optimization level:
{{{
$ g++-mp-4.7 -O0 -o test_signed_integer_output_with_karma_minimal
test_signed_integer_output_with_karma_minimal.cpp -I.../boost-trunk
$ ./test_signed_integer_output_with_karma_minimal
rational_int_adt(2, -6) = -771751935/3 (expected: -1/3)
rational_int_adt(-2, 4) = -771751935/2 (expected: -1/2)
rational_int_struct(2, -6) = 2/-6 (expected: 2/-6)
$ g++-mp-4.7 -O1 -o test_signed_integer_output_with_karma_minimal
test_signed_integer_output_with_karma_minimal.cpp -I.../boost-trunk
$ ./test_signed_integer_output_with_karma_minimal
rational_int_adt(2, -6) = 0/0 (expected: -1/3)
rational_int_adt(-2, 4) = 0/0 (expected: -1/2)
rational_int_struct(2, -6) = 2/-6 (expected: 2/-6)
}}}
Output with optimization {{{-O2}}} or {{{-O3}}} is the same as with
{{{-O1}}}.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/6126#comment:10> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:08 UTC