This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] Fix compile time warning about comparison between signed and unsigned values.
- From: Nick Clifton <nickc at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 30 Mar 2016 15:18:40 -0000
- Subject: [binutils-gdb] Fix compile time warning about comparison between signed and unsigned values.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c6025a80cc284ae2781278de6f44c672d5077797
commit c6025a80cc284ae2781278de6f44c672d5077797
Author: Nick Clifton <nickc@redhat.com>
Date: Wed Mar 30 16:18:04 2016 +0100
Fix compile time warning about comparison between signed and unsigned values.
PR target/19880
* config/tc-arm.c (do_t_push_pop): Cast bitmask to unsigned before
shifting.
Diff:
---
gas/ChangeLog | 6 ++++++
gas/config/tc-arm.c | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 4fecbe5..1b48ea4 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,9 @@
+2016-03-30 Nick Clifton <nickc@redhat.com>
+
+ PR target/19880
+ * config/tc-arm.c (do_t_push_pop): Cast bitmask to unsigned before
+ shifting.
+
2016-03-30 Claudiu Zissulescu <claziss@synopsys.com>
* testsuite/gas/all/gas.exp: Don't xfail on ARC.
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index bec091c..9c2eef5 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -12516,7 +12516,7 @@ do_t_push_pop (void)
if (inst.size_req != 4 && (mask & ~0xff) == 0)
inst.instruction = THUMB_OP16 (inst.instruction) | mask;
else if (inst.size_req != 4
- && (mask & ~0xff) == (1 << (inst.instruction == T_MNEM_push
+ && (mask & ~0xff) == (1U << (inst.instruction == T_MNEM_push
? REG_LR : REG_PC)))
{
inst.instruction = THUMB_OP16 (inst.instruction);