This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Fix compile time warning building gas for the NDS32 with gcc v6.1.1


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d2dfe54d6c4c307dd64a5e6bdcc7d1081b17233a

commit d2dfe54d6c4c307dd64a5e6bdcc7d1081b17233a
Author: Nick Clifton <nickc@redhat.com>
Date:   Tue Jun 14 13:51:10 2016 +0100

    Fix compile time warning building gas for the NDS32 with gcc v6.1.1
    
    gas	* config/tc-nds32.c (nds32_get_align): Avoid left shifting a
    	signed constant.

Diff:
---
 gas/ChangeLog         | 5 +++++
 gas/config/tc-nds32.c | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gas/ChangeLog b/gas/ChangeLog
index 1218ae5..5bc1de7 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2016-06-14  Nick Clifton  <nickc@redhat.com>
+
+	* config/tc-nds32.c (nds32_get_align): Avoid left shifting a
+	signed constant.
+
 2016-06-13  Maciej W. Rozycki  <macro@imgtec.com>
 
 	* config/tc-mips.c (mips_fix_adjustable): Don't convert RELA
diff --git a/gas/config/tc-nds32.c b/gas/config/tc-nds32.c
index 1d1a80e..643f06d 100644
--- a/gas/config/tc-nds32.c
+++ b/gas/config/tc-nds32.c
@@ -5610,7 +5610,7 @@ nds32_get_align (addressT address, int align)
 {
   addressT mask, new_address;
 
-  mask = ~((~0) << align);
+  mask = ~((~0U) << align);
   new_address = (address + mask) & (~mask);
   return (new_address - address);
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]