This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
m32c sim remove warnings
- From: Joel Sherrill <joel dot sherrill at oarcorp dot com>
- To: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 6 Jan 2009 12:24:06 -0600
- Subject: m32c sim remove warnings
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
? .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 */