From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 438 invoked by alias); 8 Jan 2009 19:11:58 -0000 Received: (qmail 428 invoked by uid 22791); 8 Jan 2009 19:11:57 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 08 Jan 2009 19:11:53 +0000 Received: (qmail 13739 invoked from network); 8 Jan 2009 19:11:52 -0000 Received: from unknown (HELO macbook-2.local) (stan@127.0.0.2) by mail.codesourcery.com with ESMTPA; 8 Jan 2009 19:11:52 -0000 Message-ID: <49664FEE.6050706@codesourcery.com> Date: Thu, 08 Jan 2009 19:11:00 -0000 From: Stan Shebs User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: Re: [PATCH] fix build breakage on arm-none-eabi References: <20090108182126.GM28711@codesourcery.com> In-Reply-To: <20090108182126.GM28711@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-01/txt/msg00169.txt.bz2 Nathan Froyd wrote: > This patch: > > http://sourceware.org/ml/gdb-patches/2009-01/msg00063.html > > breaks compilation on arm-none-eabi: > > /scratch/froydnj/fsf/armeabi/obj/gdb-src-mainline-0-arm-none-eabi-i686-pc-linux-gnu/gdb/remote-sim.c: In function `init_callbacks': > /scratch/froydnj/fsf/armeabi/obj/gdb-src-mainline-0-arm-none-eabi-i686-pc-linux-gnu/gdb/remote-sim.c:169: warning: assignment makes qualified function pointer from unqualified > > The patch below fixes compilation. sim/common/callback.c calls exit, so > I figured it was fair to make gdb_os_error call exit as well. > > OK to commit? > This is good, thanks! (I ran into it in a checkout yesterday too.) Stan > -Nathan > > 2009-01-08 Nathan Froyd > > * remote-sim.c (gdb_os_error): Mark as a noreturn function. > Call exit to make it obvious to GCC. > > Index: remote-sim.c > =================================================================== > RCS file: /cvs/src/src/gdb/remote-sim.c,v > retrieving revision 1.81 > diff -u -u -r1.81 remote-sim.c > --- remote-sim.c 3 Jan 2009 05:57:53 -0000 1.81 > +++ remote-sim.c 8 Jan 2009 18:20:26 -0000 > @@ -70,7 +70,11 @@ > > static void gdb_os_evprintf_filtered (host_callback *, const char *, va_list); > > -static void gdb_os_error (host_callback *, const char *, ...); > +static void gdb_os_error (host_callback *, const char *, ...) > +#ifdef __GNUC__ > + __attribute__ ((__noreturn__)) > +#endif > + ; > > static void gdbsim_fetch_register (struct regcache *regcache, int regno); > > @@ -273,6 +277,7 @@ > verror (format, args); > va_end (args); > } > + exit (1); > } > > int > >