public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: drow@false.org
Cc: binutils@sourceware.org
Subject: Re: Silence compiler warning on
Date: Fri, 05 May 2006 12:20:00 -0000	[thread overview]
Message-ID: <200605050941.k459fI48003434@elgar.sibelius.xs4all.nl> (raw)
In-Reply-To: <20060504183930.GA6506@nevyn.them.org> (message from Daniel 	Jacobowitz on Thu, 4 May 2006 14:39:30 -0400)

> Date: Thu, 4 May 2006 14:39:30 -0400
> From: Daniel Jacobowitz <drow@false.org>
> 
> 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  <kettenis@jive.nl>
> > 
> >         * 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  <dan@codesourcery.com>
> 
> 	* configure.in: Check if _exit with ATTRIBUTE_NORETURN is OK.
> 	* bfd.c (_bfd_abort): Handle USE_EXIT_NORETURN.
> 	* configure, config.in: Regenerated.

Mark

  reply	other threads:[~2006-05-05  9:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-18  9:40 Mark Kettenis
2006-04-18 23:50 ` Ian Lance Taylor
2006-04-19  7:44   ` Mark Kettenis
2006-04-19  8:22     ` Ian Lance Taylor
2006-05-04 18:39 ` Daniel Jacobowitz
2006-05-05 12:20   ` Mark Kettenis [this message]
2006-05-05 13:07     ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200605050941.k459fI48003434@elgar.sibelius.xs4all.nl \
    --to=mark.kettenis@xs4all.nl \
    --cc=binutils@sourceware.org \
    --cc=drow@false.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).