ubsan: hppa: negation of -2147483648

Alan Modra amodra@gmail.com
Mon Jan 20 09:51:00 GMT 2020


	* hppa-dis.c (fput_const): Remove useless cast.

diff --git a/opcodes/hppa-dis.c b/opcodes/hppa-dis.c
index 3c15701716..93156da7cb 100644
--- a/opcodes/hppa-dis.c
+++ b/opcodes/hppa-dis.c
@@ -207,7 +207,7 @@ static void
 fput_const (unsigned num, disassemble_info *info)
 {
   if ((int) num < 0)
-    (*info->fprintf_func) (info->stream, "-%x", - (int) num);
+    (*info->fprintf_func) (info->stream, "-%x", -num);
   else
     (*info->fprintf_func) (info->stream, "%x", num);
 }

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list