Fix compile time warning building gas for the NDS32 with gcc v6.1.1
authorNick Clifton <nickc@redhat.com>
Tue, 14 Jun 2016 12:51:10 +0000 (13:51 +0100)
committerNick Clifton <nickc@redhat.com>
Tue, 14 Jun 2016 12:51:10 +0000 (13:51 +0100)
gas * config/tc-nds32.c (nds32_get_align): Avoid left shifting a
signed constant.

gas/ChangeLog
gas/config/tc-nds32.c

index 1218ae52142d48c31c2f4e4395129764e37c2463..5bc1de73eaef20050ef59a269e0ba7bdc00be934 100644 (file)
@@ -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
index 1d1a80e81ee054bff5f7d2f9d8e4e6c111c8e958..643f06d88b4f05748b68c8c8715e90507898de6b 100644 (file)
@@ -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);
 }