From: Alan Modra Date: Mon, 31 Aug 2020 05:06:34 +0000 (+0930) Subject: PR26471 UBSAN: tc-metag.c:7038 left shift cannot be represented X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=46021a61e42fcda467a7092b03b65095c57f2bc5;p=binutils-gdb.git PR26471 UBSAN: tc-metag.c:7038 left shift cannot be represented PR 26471 * config/tc-metag.c (md_chars_to_number): Make retval unsigned. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 7b6b28dcf04..9b95d5166df 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2020-08-31 Alan Modra + + PR 26471 + * config/tc-metag.c (md_chars_to_number): Make retval unsigned. + 2020-08-31 Alan Modra PR 26468 diff --git a/gas/config/tc-metag.c b/gas/config/tc-metag.c index 2816640b29e..1e923415a00 100644 --- a/gas/config/tc-metag.c +++ b/gas/config/tc-metag.c @@ -7030,7 +7030,7 @@ tc_gen_reloc (asection *seg ATTRIBUTE_UNUSED, fixS *fixp) static unsigned int md_chars_to_number (char *val, int n) { - int retval; + unsigned int retval; unsigned char * where = (unsigned char *) val; for (retval = 0; n--;)