Fix Rust lexer buglet
authorTom Tromey <tromey@adacore.com>
Tue, 9 Apr 2019 19:19:28 +0000 (13:19 -0600)
committerTom Tromey <tromey@adacore.com>
Tue, 9 Apr 2019 19:21:13 +0000 (13:21 -0600)
commit8dc433a0fb04f8fa37530d0788053dd9bea5c37d
tree3fbedde5a04dcdbc10f3a273b4bd792c72fb3f4c
parentb0319eaaf9d1f4e730c532058f2fff0b4e5ce682
Fix Rust lexer buglet

PR rust/24414 points out that the Rust lexer uses strtoul when lexing
an integer, and that this can give the wrong results in some
situations.

This patch changes it to use strtoulst, like most of the rest of gdb.
It also adds a self test.

Tested on x86-64 Fedora 29 using an i686 build.

gdb/ChangeLog
2019-04-09  Ivan Begert  <ivanbegert@gmail.com>
    Tom Tromey  <tromey@adacore.com>

PR rust/24414:
* rust-exp.y (rust_parser::lex_number): Use strtoulst.
(rust_lex_int_test): Change "value" to be LONGEST.
(rust_lex_tests): Add test for long integer literal.
gdb/ChangeLog
gdb/rust-exp.y
This page took 0.024282 seconds and 4 git commands to generate.