From: Ralf Corsepius <ralf.corsepius@rtems.org>
To: GDB Patches <gdb-patches@sources.redhat.com>
Subject: [PATCH,sim/sh] lvalue casts
Date: Mon, 02 May 2005 15:18:00 -0000 [thread overview]
Message-ID: <1115047102.24385.376.camel@mccallum.corsepiu.local> (raw)
[-- Attachment #1: Type: text/plain, Size: 230 bytes --]
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
[-- Attachment #2: sim-sh-rc-20050502.diff --]
[-- Type: text/x-patch, Size: 701 bytes --]
2005-05-02 Ralf Corsepius <ralf.corsepius@rtems.org>
* gencode.c (divu R0,<REG_N>): 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,<REG_N>", "0100nnnn10000000",
next reply other threads:[~2005-05-02 15:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-02 15:18 Ralf Corsepius [this message]
2005-06-17 3:13 ` Daniel Jacobowitz
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=1115047102.24385.376.camel@mccallum.corsepiu.local \
--to=ralf.corsepius@rtems.org \
--cc=gdb-patches@sources.redhat.com \
/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