This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: SH simulator build fix
- From: Daniel Jacobowitz <drow at false dot org>
- To: Jonathan Larmour <jifl at eCosCentric dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Tue, 12 Apr 2005 15:10:39 -0400
- Subject: Re: SH simulator build fix
- References: <425C1BD6.6020105@eCosCentric.com>
On Tue, Apr 12, 2005 at 08:04:54PM +0100, Jonathan Larmour wrote:
> The SH simulator doesn't build on slightly older GCC. gencode.c relies on
> the C99 ability (like C++) to define variables after code in a function.
> So for example it would generate source code in code.c like:
>
> case 37:
> {
> {
> RAISE_EXCEPTION_IF_IN_DELAY_SLOT ();
> int i;
>
> where RAISE_EXCEPTION_IF_IN_DELAY_SLOT is:
> #define RAISE_EXCEPTION_IF_IN_DELAY_SLOT() \
> if (in_delay_slot) RAISE_EXCEPTION (SIGILL)
>
>
> Fortunately the fix is trivial, and attached!
>
> 2005-04-12 Jonathan Larmour <jifl@eCosCentric.com>
>
> * gencode.c (tab): Avoid inserting code before variables all
> declared.
>
> I have CVS write access to src, so I can do the check-in assuming that's
> easier.
Sure looks like an obvious fix to me; please go ahead, assuming that
you have tested the resulting simulator.
--
Daniel Jacobowitz
CodeSourcery, LLC