Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* m32c sim remove warnings
@ 2009-01-06 18:24 Joel Sherrill
  2009-01-06 18:52 ` DJ Delorie
  0 siblings, 1 reply; 3+ messages in thread
From: Joel Sherrill @ 2009-01-06 18:24 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 1045 bytes --]

Hi,

The attached patch adds parentheses to eliminate these
warnings.

sim/m32c/r8c.opc: In function ‘decode_r8c’:
sim/m32c/r8c.opc:478: warning: suggest parentheses around operand of ‘!’ 
or change ‘&’ to ‘&&’ or ‘!’ to ‘~’
sim/m32c/r8c.opc:482: warning: suggest parentheses around operand of ‘!’ 
or change ‘|’ to ‘||’ or ‘!’ to ‘~’
sim_log: m32c.out
sim/m32c/m32c.opc: In function ‘decode_m32c’:
sim/m32c/m32c.opc:645: warning: suggest parentheses around operand of 
‘!’ or change ‘&’ to ‘&&’ or ‘!’ to ‘~’
sim/m32c/m32c.opc:651: warning: suggest parentheses around operand of 
‘!’ or change ‘|’ to ‘||’ or ‘!’ to ‘~’

2009-01-06 Joel Sherrill <joel.sherrill@oarcorp.com>

* r8c.opc, m32c.opc: Add parentheses to remove warnings.

Is this patch OK to commit?

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill@OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985



[-- Attachment #2: m32c-warnings.diff --]
[-- Type: text/x-patch, Size: 1183 bytes --]

? .r8c.opc.swp
Index: m32c.opc
===================================================================
RCS file: /cvs/src/src/sim/m32c/m32c.opc,v
retrieving revision 1.6
diff -u -r1.6 m32c.opc
--- m32c.opc	17 Jun 2008 00:34:37 -0000	1.6
+++ m32c.opc	6 Jan 2009 18:21:50 -0000
@@ -642,13 +642,13 @@
 
   prefix (0, 0, 0);
   sc = decode_src23 (sss, ss, 1);
-  BIT_OPC (sc, bit, !b & carry);
+  BIT_OPC (sc, bit, (!b) & carry);
 
   /** 0000 0001 1101 sss0 ss11 0bit	BNOR src */
 
   prefix (0, 0, 0);
   sc = decode_src23 (sss, ss, 1);
-  BIT_OPC (sc, bit, !b | carry);
+  BIT_OPC (sc, bit, (!b) | carry);
 
   /** 1101 ddd0 dd01 1bit		BNOT dest */
 
Index: r8c.opc
===================================================================
RCS file: /cvs/src/src/sim/m32c/r8c.opc,v
retrieving revision 1.7
diff -u -r1.7 r8c.opc
--- r8c.opc	6 Jun 2008 19:18:15 -0000	1.7
+++ r8c.opc	6 Jan 2009 18:21:50 -0000
@@ -475,11 +475,11 @@
 
   /** 0111 1110 0101 srcx  BNAND src */
 
-  BIT_OPC (srcx, !b & carry);
+  BIT_OPC (srcx, (!b) & carry);
 
   /** 0111 1110 0111 srcx  BNOR src */
 
-  BIT_OPC (srcx, !b | carry);
+  BIT_OPC (srcx, (!b) | carry);
 
   /** 0111 1110 1010 dest  BNOT:G dest */
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: m32c sim remove warnings
  2009-01-06 18:24 m32c sim remove warnings Joel Sherrill
@ 2009-01-06 18:52 ` DJ Delorie
  2009-01-06 19:02   ` Joel Sherrill
  0 siblings, 1 reply; 3+ messages in thread
From: DJ Delorie @ 2009-01-06 18:52 UTC (permalink / raw)
  To: Joel Sherrill; +Cc: gdb-patches


> Is this patch OK to commit?

Yes please :-)


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: m32c sim remove warnings
  2009-01-06 18:52 ` DJ Delorie
@ 2009-01-06 19:02   ` Joel Sherrill
  0 siblings, 0 replies; 3+ messages in thread
From: Joel Sherrill @ 2009-01-06 19:02 UTC (permalink / raw)
  To: DJ Delorie; +Cc: gdb-patches

DJ Delorie wrote:
>> Is this patch OK to commit?
>>     
>
> Yes please :-)
>   
Committed.

--joel


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-01-06 19:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-06 18:24 m32c sim remove warnings Joel Sherrill
2009-01-06 18:52 ` DJ Delorie
2009-01-06 19:02   ` Joel Sherrill

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox