From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16165 invoked by alias); 6 Jan 2009 18:24:21 -0000 Received: (qmail 16152 invoked by uid 22791); 6 Jan 2009 18:24:20 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_41 X-Spam-Check-By: sourceware.org Received: from mail.oarcorp.com (HELO OARmail.OARCORP.com) (216.186.189.5) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 06 Jan 2009 18:24:13 +0000 Received: from [192.168.1.3] (192.168.1.3) by OARmail.OARCORP.com (192.168.2.2) with Microsoft SMTP Server (TLS) id 8.1.336.0; Tue, 6 Jan 2009 12:19:23 -0600 Message-ID: <4963A1C6.9080008@oarcorp.com> Date: Tue, 06 Jan 2009 18:24:00 -0000 From: Joel Sherrill User-Agent: Thunderbird 2.0.0.18 (X11/20081119) MIME-Version: 1.0 To: "gdb-patches@sourceware.org" Subject: m32c sim remove warnings Content-Type: multipart/mixed; boundary="------------000106060702060205000201" Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-01/txt/msg00049.txt.bz2 --------------000106060702060205000201 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 8bit Content-length: 1001 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 * 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 --------------000106060702060205000201 Content-Type: text/x-patch; name="m32c-warnings.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="m32c-warnings.diff" Content-length: 1183 ? .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 */ --------------000106060702060205000201--