This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB 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 gcc-5 compilation


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

commit 95761b2d9c3c77933cac233b93eff371b3e52859
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Fri Jan 16 06:39:47 2015 +0100

    Fix gcc-5 compilation
    
    With gcc-5.0 pre-release one gets:
    
    hppa-tdep.c: In function â??inst_saves_grâ??:
    hppa-tdep.c:1406:30: error: comparison of constant â??9â?? with boolean expression is always false [-Werror=bool-compare]
    
    I find the misplaced parentheses obvious.
    
    gdb/ChangeLog
    2015-01-16  Jan Kratochvil  <jan.kratochvil@redhat.com>
    
    	Fix gcc-5 compilation.
    	* hppa-tdep.c (inst_saves_gr): Fix parentheses typo.

Diff:
---
 gdb/ChangeLog   | 5 +++++
 gdb/hppa-tdep.c | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 37955d4..85c4a6d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2015-01-16  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	Fix gcc-5 compilation.
+	* hppa-tdep.c (inst_saves_gr): Fix parentheses typo.
+
 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
 
 	* Makefile.in (HFILES_NO_SRCDIR): Add nat/linux-personality.h.
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 29e297b..036bc16 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -1403,7 +1403,7 @@ inst_saves_gr (unsigned long inst)
   if ((inst >> 26) == 0x19 || (inst >> 26) == 0x18
       || ((inst >> 26) == 0x3
 	  && (((inst >> 6) & 0xf) == 0x8
-	      || (inst >> 6) & 0xf) == 0x9))
+	      || ((inst >> 6) & 0xf) == 0x9)))
     return hppa_extract_5R_store (inst);
 
   return 0;


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