From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28632 invoked by alias); 5 May 2006 09:41:58 -0000 Received: (qmail 28617 invoked by uid 22791); 5 May 2006 09:41:57 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 05 May 2006 09:41:54 +0000 Received: from elgar.sibelius.xs4all.nl (root@elgar.sibelius.xs4all.nl [192.168.0.2]) by sibelius.xs4all.nl (8.13.4/8.13.4) with ESMTP id k459fIIL004328; Fri, 5 May 2006 11:41:18 +0200 (CEST) Received: from elgar.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.13.6/8.13.6) with ESMTP id k459fI3w023120; Fri, 5 May 2006 11:41:18 +0200 (CEST) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.13.6/8.13.6/Submit) id k459fI48003434; Fri, 5 May 2006 11:41:18 +0200 (CEST) Date: Fri, 05 May 2006 12:20:00 -0000 Message-Id: <200605050941.k459fI48003434@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: drow@false.org CC: binutils@sourceware.org In-reply-to: <20060504183930.GA6506@nevyn.them.org> (message from Daniel Jacobowitz on Thu, 4 May 2006 14:39:30 -0400) Subject: Re: Silence compiler warning on References: <200604180912.k3I9Cvra015638@elgar.sibelius.xs4all.nl> <20060504183930.GA6506@nevyn.them.org> Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2006-05/txt/msg00106.txt.bz2 > Date: Thu, 4 May 2006 14:39:30 -0400 > From: Daniel Jacobowitz > > On Tue, Apr 18, 2006 at 11:12:57AM +0200, Mark Kettenis wrote: > > Right now, when I compile BFD on HP-UX 10.20, I get the following > > warning (wich is fatal because of -Werror): > > > > /export/jive/kettenis/src/gdb/bfd/bfd.c: In function `_bfd_abort': > > /export/jive/kettenis/src/gdb/bfd/bfd.c:801: warning: `noreturn' function does return > > > > The problem here is that the system headers don't declare _exit() with > > __attribute__((noreturn). Previously we didn't get this warning > > because _bfd_abort() called xexit(), which was declared with > > __attribute__((noreturn)) (and xexit.c was compiled without -Werror). > > > > The attached patch is an attempt to fix this. Ok? > > > > Index: ChangeLog > > from Mark Kettenis > > > > * bfd.c (_bfd_abort): Provide prototype for _exit with > > ATTRIBUTE_NORETURN. > > I would like this fixed before binutils 2.17. Does something like this > work for you? Unfortunately not :( configure:11800: checking if we can redeclare _exit configure:11821: gcc -c -g -O2 conftest.c >&5 conftest.c:80: ../include/ansidecl.h: No such file or directory However, it seems that this only happens with GCC 2.95.3 (and probably older versions). Newer GCC versions seem to be aware of the fact that _exit() will never return. Perhaps people should just upgrade to a newer GCC or use --disable-werror. There is another nasty configure issue on HP-UX 10.20 though. I'll try to finish the patch I was working on today. > 2006-05-04 Daniel Jacobiwtz > > * configure.in: Check if _exit with ATTRIBUTE_NORETURN is OK. > * bfd.c (_bfd_abort): Handle USE_EXIT_NORETURN. > * configure, config.in: Regenerated. Mark