From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31838 invoked by alias); 12 Apr 2005 19:10:47 -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 31811 invoked from network); 12 Apr 2005 19:10:40 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 12 Apr 2005 19:10:40 -0000 Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian)) id 1DLQmV-0002n0-Ks; Tue, 12 Apr 2005 15:10:39 -0400 Date: Tue, 12 Apr 2005 19:10:00 -0000 From: Daniel Jacobowitz To: Jonathan Larmour Cc: gdb-patches@sources.redhat.com Subject: Re: SH simulator build fix Message-ID: <20050412191039.GA10613@nevyn.them.org> Mail-Followup-To: Jonathan Larmour , gdb-patches@sources.redhat.com References: <425C1BD6.6020105@eCosCentric.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <425C1BD6.6020105@eCosCentric.com> User-Agent: Mutt/1.5.8i X-SW-Source: 2005-04/txt/msg00102.txt.bz2 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 > > * 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