Commit: NDS32: Fix compile time warning

Nick Clifton nickc@redhat.com
Tue Jun 14 12:50:00 GMT 2016


Hi Guys,

  I am checking in the patch below to fix another compile time warning
  encountered when using gcc v6.1.1.  This time it is for the ND32
  assembler.

Cheers
  Nick

gas/ChangeLog
2016-06-14  Nick Clifton  <nickc@redhat.com>

	* config/tc-nds32.c (nds32_get_align): Avoid left shifting a
	signed constant.

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);
 }



More information about the Binutils mailing list