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] Fixes: "gas/read.c:5087:12: error: left shift of negative"


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

commit 29798047afaa22335a504280a5bbdbafe2b1b63d
Author: Nick Clifton <nickc@redhat.com>
Date:   Fri May 22 14:27:36 2015 +0100

    Fixes: "gas/read.c:5087:12: error: left shift of negative"
    
    	PR gas/18446
    	* read.c (output_big_sleb128): Use U suffix to prevent compile
    	time warning.

Diff:
---
 gas/ChangeLog | 6 ++++++
 gas/read.c    | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/gas/ChangeLog b/gas/ChangeLog
index cc0ad42..f3a30d2 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,9 @@
+2015-05-22  Nick Clifton  <nickc@redhat.com>
+
+	PR gas/18446
+	* read.c (output_big_sleb128): Use U suffix to prevent compile
+	time warning.
+
 2015-05-19  Jiong Wang  <jiong.wang@arm.com>
 
 	* config/tc-aarch64.c (process_movw_reloc_info): Sort relocation case
diff --git a/gas/read.c b/gas/read.c
index 2224c0e..816c255 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -5084,7 +5084,7 @@ output_big_sleb128 (char *p, LITTLENUM_TYPE *bignum, int size)
     {
       /* Sign-extend VAL.  */
       if (val & (1 << (loaded - 1)))
-	val |= ~0 << loaded;
+	val |= ~0U << loaded;
       if (orig)
 	*p = val & 0x7f;
       p++;


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