Opened 9 years ago
Closed 9 years ago
#9007 closed Bugs (fixed)
Spirt Int parser fails to detect overflow when using gcc 4.8
| Reported by: | Owned by: | Joel de Guzman | |
|---|---|---|---|
| Milestone: | To Be Determined | Component: | spirit | 
| Version: | Boost 1.54.0 | Severity: | Problem | 
| Keywords: | Cc: | 
Description
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
Attachments (1)
Change History (2)
by , 9 years ago
| Attachment: | ticket-9007-testcase.cpp added | 
|---|
comment:1 by , 9 years ago
| Resolution: | → fixed | 
|---|---|
| Status: | new → closed | 
  Note:
 See   TracTickets
 for help on using tickets.
    

test-case