Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Sherrill <joel.sherrill@oarcorp.com>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: m32c sim remove warnings
Date: Tue, 06 Jan 2009 18:24:00 -0000	[thread overview]
Message-ID: <4963A1C6.9080008@oarcorp.com> (raw)

[-- 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 */
 

             reply	other threads:[~2009-01-06 18:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-06 18:24 Joel Sherrill [this message]
2009-01-06 18:52 ` DJ Delorie
2009-01-06 19:02   ` Joel Sherrill

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4963A1C6.9080008@oarcorp.com \
    --to=joel.sherrill@oarcorp.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox