mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
bison: check for int overflow when scanning
* src/scan-gram.l: Include errno.h, for errno. (scan_integer, handle_syncline): Check for integer overflow. * tests/input.at (too-large.y): Adjust to match new diagnostics.
This commit is contained in:
@@ -1523,7 +1523,9 @@ start: TOO_LARGE_DEC TOO_LARGE_HEX
|
||||
|
||||
AT_BISON_CHECK([too-large.y], [1], [],
|
||||
[[too-large.y:9.22-42: error: integer out of range: '999999999999999999999'
|
||||
too-large.y:9.22-42: error: user token number of TOO_LARGE_DEC too large
|
||||
too-large.y:10.24-44: error: integer out of range: '0xFFFFFFFFFFFFFFFFFFF'
|
||||
too-large.y:10.24-44: error: user token number of TOO_LARGE_HEX too large
|
||||
]])
|
||||
|
||||
AT_BISON_OPTION_POPDEFS
|
||||
|
||||
Reference in New Issue
Block a user