Re: [PATCH 1/2] Remove noreturn function pointers in usage.c
- From
Jeff King <peff@peff.net>
- Date
- Jun 9, 2011, 05:52 UTC
- Message-ID
- <20110609055224.GA27780@sigill.intra.peff.net>
- In-Reply-To
- <20110609045915.GA15448@one.firstfloor.org>
On Thu, Jun 09, 2011 at 06:59:15AM +0200, Andi Kleen wrote:
Show 6 quoted lines
> > - Potential impact to people who do not use Gcc 4.6 with profile feedback > > is not explained away well, except for "Doesn't seem to make any > > difference." > > I merely went by "there are no new warnings" (I assume that's the main > motivation)
On your compiler and settings, perhaps. With your patch I get:
usage.c: In function ‘die’: usage.c:70:1: error: ‘noreturn’ function does return [-Werror]
And rightfully so:
void NORETURN die(const char *err, ...)
{
va_list params; va_start(params, err);
die_routine(err, params);
va_end(params);
}You've stripped the NORETURN from die_routine, so of course it looks like we end up returning.
This is with:
$ gcc --version | head -n 1 gcc (Debian 4.6.0-11) 4.6.1 20110604 (prerelease)
-Peff