From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4775 invoked by alias); 2 May 2005 15:18:33 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 4731 invoked from network); 2 May 2005 15:18:24 -0000 Received: from unknown (HELO mout1.freenet.de) (194.97.50.132) by sourceware.org with SMTP; 2 May 2005 15:18:24 -0000 Received: from [194.97.50.135] (helo=mx2.freenet.de) by mout1.freenet.de with esmtpa (Exim 4.51) id 1DScgi-0002Ah-73 for gdb-patches@sources.redhat.com; Mon, 02 May 2005 17:18:24 +0200 Received: from j1e4b.j.pppool.de ([85.74.30.75] helo=[192.168.0.172]) by mx2.freenet.de with esmtpsa (ID rcrtems@freenet.de) (SSLv3:RC4-MD5:128) (Exim 4.51 #8) id 1DScgh-0004O8-SO for gdb-patches@sources.redhat.com; Mon, 02 May 2005 17:18:24 +0200 Subject: [PATCH,sim/sh] lvalue casts From: Ralf Corsepius To: GDB Patches Content-Type: multipart/mixed; boundary="=-wlSIDPWqgXwjX4fBxGJN" Date: Mon, 02 May 2005 15:18:00 -0000 Message-Id: <1115047102.24385.376.camel@mccallum.corsepiu.local> Mime-Version: 1.0 X-SW-Source: 2005-05/txt/msg00046.txt.bz2 --=-wlSIDPWqgXwjX4fBxGJN Content-Type: text/plain Content-Transfer-Encoding: 7bit Content-length: 230 Hi, gcc-4.0.0 chokes on with an "invalid lvalue" error on the code generated by sh/gencode.c (gdb-CVS mainline). The patch below seems to fix this issue for me. AFAIS, the "(unsigned int) R[]" cast are just superfluous. Ralf --=-wlSIDPWqgXwjX4fBxGJN Content-Disposition: attachment; filename=sim-sh-rc-20050502.diff Content-Type: text/x-patch; name=sim-sh-rc-20050502.diff; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-length: 701 2005-05-02 Ralf Corsepius * gencode.c (divu R0,): Remove lvalue casts to please gcc4. Index: gencode.c =================================================================== RCS file: /cvs/src/src/sim/sh/gencode.c,v retrieving revision 1.31 diff -u -r1.31 gencode.c --- gencode.c 14 Apr 2005 20:16:06 -0000 1.31 +++ gencode.c 2 May 2005 15:10:03 -0000 @@ -215,7 +215,7 @@ "RAISE_EXCEPTION_IF_IN_DELAY_SLOT ();", "if (R0 == 0)", " R[n] = 0xffffffff;", - "else (unsigned int) R[n] = (unsigned int) R[n] / (unsigned int) R0;", + "else R[n] = R[n] / (unsigned int) R0;", "L (n);", }, { "n", "0n", "mulr R0,", "0100nnnn10000000", --=-wlSIDPWqgXwjX4fBxGJN--