From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28575 invoked by alias); 12 Apr 2005 21:50:19 -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 28556 invoked from network); 12 Apr 2005 21:50:10 -0000 Received: from unknown (HELO smtp.ecoscentric.com) (194.153.168.165) by sourceware.org with SMTP; 12 Apr 2005 21:50:10 -0000 Received: by smtp.ecoscentric.com (Postfix, from userid 99) id CCA5965C0BA; Tue, 12 Apr 2005 22:50:09 +0100 (BST) Received: from eCosCentric.com (localhost [127.0.0.1]) by smtp.ecoscentric.com (Postfix) with ESMTP id 29E9265C057; Tue, 12 Apr 2005 22:50:09 +0100 (BST) Message-ID: <425C4290.4020900@eCosCentric.com> Date: Tue, 12 Apr 2005 21:50:00 -0000 From: Jonathan Larmour User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.4) Gecko/20030703 MIME-Version: 1.0 To: Daniel Jacobowitz Cc: gdb-patches@sources.redhat.com Subject: Re: SH simulator build fix References: <425C1BD6.6020105@eCosCentric.com> <20050412191039.GA10613@nevyn.them.org> In-Reply-To: <20050412191039.GA10613@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on norbert.ecoscentric.com X-Spam-Level: X-Spam-Status: No, hits=-4.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=2.63 X-SW-Source: 2005-04/txt/msg00107.txt.bz2 Daniel Jacobowitz wrote: > 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. For a build failure? I'm not in a position to test the simulator sorry. I don't have tools that can generate code that can run in it. To be honest, the build failure was only affecting me by getting in the way of a GDB build. Jifl -- eCosCentric http://www.eCosCentric.com/ The eCos and RedBoot experts --["No sense being pessimistic, it wouldn't work anyway"]-- Opinions==mine