[Boost-bugs] [Boost C++ Libraries] #9007: Spirt Int parser fails to detect overflow when using gcc 4.8

Subject: [Boost-bugs] [Boost C++ Libraries] #9007: Spirt Int parser fails to detect overflow when using gcc 4.8
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-08-16 14:29:58


#9007: Spirt Int parser fails to detect overflow when using gcc 4.8
------------------------------+---------------------
 Reporter: cmoore@… | Owner: djowel
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: spirit
  Version: Boost 1.54.0 | Severity: Problem
 Keywords: |
------------------------------+---------------------
 Attached test program that tries to parse a string containing INT_MAX+1.

 Expected the parser to fail. When compiled with gcc 4.8, instead it
 succeeds and returns MIN_INT.

 When compiled with gcc 4.7, 4,2 or clang 3.3, it behaves as expected.

 Sample output:
 {{{
 $ ./Main.gcc48
 sizeof(int): 4
 Parsing '2147483647':
   parse success 2147483647
 Parsing '2147483648':
   parse success -2147483648


 $ ./Main.gcc47
 sizeof(int): 4
 Parsing '2147483647':
   parse success 2147483647
 Parsing '2147483648':
   parse failed
 }}}

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