[Boost-bugs] [Boost C++ Libraries] #9152: Classic Spirit parser does not handle negative exponents when patform does not support denormalized numbers.

Subject: [Boost-bugs] [Boost C++ Libraries] #9152: Classic Spirit parser does not handle negative exponents when patform does not support denormalized numbers.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-09-23 14:47:50


#9152: Classic Spirit parser does not handle negative exponents when patform does
not support denormalized numbers.
-------------------------------------------+---------------------
 Reporter: Matthew Markland <markland@…> | Owner: djowel
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: spirit
  Version: Boost 1.54.0 | Severity: Problem
 Keywords: |
-------------------------------------------+---------------------
 A classic Spirit parser has trouble parsing floating point values which
 have a negative exponent on platforms where has_denorm is false. The
 initial example from the Spirit documentation illustrates the problem
 (note, this is the example from the 1.8.5 documentation, tweaked for
 1.54).

 {{{
 markland_at_jute geir2 $ CC -I/cray/css/users/markland/boost_1_54_0
 classic_numbers.cpp
 markland_at_jute geir2 $ ./a.out
 /////////////////////////////////////////////////////////

                 A comma separated list parser for Spirit...

 /////////////////////////////////////////////////////////

 Give me a comma separated list of numbers.
 The numbers will be inserted in a vector of numbers
 Type [q or Q] to quit

 1.5
 -------------------------
 Parsing succeeded
 1.5 Parses OK:
 0: 1.5
 -------------------------
 1e-07
 -------------------------
 Parsing failed
 -------------------------
 Bye... :-)
 }}}

 This looks to be an issue in the negative_accumulate::add() function found
 in boost/spirit/home/classic/core/primitives/impl/numerics.ipp.

 The platform I have seen this fail on is using the Cray Compiling
 Environment version 8.x. I do not currently have a patch or a workaround.

 The Qi parser example appears to work for this example, even on the Cray
 platform.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9152>
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:14 UTC