From 251150adb1ec4315f2ec66aceb289cc0ccbf7438 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 2 Sep 2020 10:08:11 +0930 Subject: [PATCH] ubsan: bfin-lex.l:503 left shift cannot be represented * config/bfin-lex.l: Use an unsigned type for "value". --- gas/ChangeLog | 4 ++++ gas/config/bfin-lex.l | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index b7cc8cb3d95..bcc56ca3b25 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,7 @@ +2020-09-02 Alan Modra + + * config/bfin-lex.l: Use an unsigned type for "value". + 2020-09-02 Alan Modra * config/tc-pdp11.c (md_number_to_chars): Condition nbytes=8 code diff --git a/gas/config/bfin-lex.l b/gas/config/bfin-lex.l index 6837f0d8c8e..d31ecc6ef3a 100644 --- a/gas/config/bfin-lex.l +++ b/gas/config/bfin-lex.l @@ -344,7 +344,7 @@ static long parse_int (char **end) int not_done = 1; int shiftvalue = 0; char * char_bag; - long value = 0; + unsigned long value = 0; char *arg = *end; while (*arg && *arg == ' ') -- 2.30.2