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]

Re: [patch] rl78: GCC false warning workaround


On Wed, 10 Apr 2013 19:17:55 +0200, H.J. Lu wrote:
> Can you oper = opcode.op[*s == '0'];?

Yes.


Jan


opcodes/
2013-04-10  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* rl78-dis.c (print_insn_rl78): Use alternative form as a GCC false
	warning workaround.

diff --git a/opcodes/rl78-dis.c b/opcodes/rl78-dis.c
index 1ceee8d..323d729 100644
--- a/opcodes/rl78-dis.c
+++ b/opcodes/rl78-dis.c
@@ -217,7 +217,7 @@ print_insn_rl78 (bfd_vma addr, disassemble_info * dis)
 
 	    case '0':
 	    case '1':
-	      oper = opcode.op + *s - '0';
+	      oper = &opcode.op[*s == '1'];
 	    if (do_es)
 	      {
 		if (oper->use_es && indirect_type (oper->type))


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