diff options
Diffstat (limited to 'gdb/rust-parse.c')
-rw-r--r-- | gdb/rust-parse.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/rust-parse.c b/gdb/rust-parse.c index 7d7d882..836f491 100644 --- a/gdb/rust-parse.c +++ b/gdb/rust-parse.c @@ -1024,7 +1024,10 @@ rust_parser::lex_number () } } - value = strtoulst (number.c_str () + offset, NULL, radix); + const char *trailer; + value = strtoulst (number.c_str () + offset, &trailer, radix); + if (*trailer != '\0') + error ("Integer literal is too large"); if (implicit_i32 && value >= ((uint64_t) 1) << 31) type = get_type ("i64"); |