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 for tc-h8300.c when using gcc 5+.


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

commit 239c0f4cebf8da3914597e2e296f5d172c2c62fb
Author: Nick Clifton <nickc@redhat.com>
Date:   Thu Jun 4 16:20:35 2015 +0100

    Fix compile time warning for tc-h8300.c when using gcc 5+.
    
    	* config/tc-h8300.c (md_section_align): Fix compile time warning
    	about left shifting a negative value.

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

diff --git a/gas/ChangeLog b/gas/ChangeLog
index 7424cf8..2893726 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -9,6 +9,11 @@
 	* config/tc-arm.c (arm_init_frag): Use frag's thumb_mode information
 	when available.
 
+2015-06-04  Nick Clifton  <nickc@redhat.com>
+
+	* config/tc-h8300.c (md_section_align): Fix compile time warning
+	about left shifting a negative value.
+
 2015-06-03  Matthew Wahab  <matthew.wahab@arm.com>
 
 	* config/tc-arm.c (arm_archs): Add "armv8.1-a".
diff --git a/gas/config/tc-h8300.c b/gas/config/tc-h8300.c
index 2c8a080..9ff8138 100644
--- a/gas/config/tc-h8300.c
+++ b/gas/config/tc-h8300.c
@@ -2256,7 +2256,7 @@ valueT
 md_section_align (segT segment, valueT size)
 {
   int align = bfd_get_section_alignment (stdoutput, segment);
-  return ((size + (1 << align) - 1) & (-1 << align));
+  return ((size + (1 << align) - 1) & (-1U << align));
 }
 
 void


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