This is the mail archive of the binutils@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]

Commit: NDS32: Fix compile time warning


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


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