From: Junio C Hamano <gitster@pobox.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: git@vger.kernel.org, Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH 2/3] Add a lot of dummy returns to avoid warnings with NO_NORETURN
Date: Mon, 20 Jun 2011 14:59:36 -0700 [thread overview]
Message-ID: <7vfwn4b1vb.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20110620213001.GB32765@one.firstfloor.org> (Andi Kleen's message of "Mon, 20 Jun 2011 23:30:01 +0200")
Andi Kleen <andi@firstfloor.org> writes:
> On Mon, Jun 20, 2011 at 02:17:32PM -0700, Junio C Hamano wrote:
>> Andi Kleen <andi@firstfloor.org> writes:
>>
>> > From: Andi Kleen <ak@linux.intel.com>
>> >
>> > Add a lot of dummy returns to silence "control flow reaches
>> > end of non void function" warnings with disabled noreturn.
>> >
>> > If NO_NORETURN is not disabled they will be all optimized away.
>>
>> I think this is probably a bad move, given that the previous patch is a
>
> This is basically the patch you suggested. Do you have some other suggestion
> now?
Sorry, I do not recall suggesting to add these dummy returns. The NO_NORETURN
workaround (your [1/3]) is what I remember.
>> these will introduce noise for build without NO_NORETURN (either when
>> profile feedback is not used, or when profile feedback build is in use and
>> it no longer requires the NO_NORETURN workaround).
>
> I fixed the noise in a followon patch.
I suspect that we are talking about different warnings.
The extra unreachable returns this patch adds will introduce more
"unreachable code" warnings, which was what my message you are responding
to is about.
While I agree with you that this patch will now squelch "control flow
reaches end of non void function" warnings (which is your justification
for this patch), I am just pointing out that it is like robbing Peter to
pay Paul.
next prev parent reply other threads:[~2011-06-20 21:59 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-19 1:07 [PATCH 1/3] Add option to disable NORETURN Andi Kleen
2011-06-19 1:07 ` [PATCH 2/3] Add a lot of dummy returns to avoid warnings with NO_NORETURN Andi Kleen
2011-06-20 21:17 ` Junio C Hamano
2011-06-20 21:30 ` Andi Kleen
2011-06-20 21:59 ` Junio C Hamano [this message]
2011-06-20 22:03 ` Andi Kleen
2011-06-20 22:31 ` Jonathan Nieder
2011-06-20 22:37 ` Andi Kleen
2011-06-20 22:46 ` Jonathan Nieder
2011-06-20 22:48 ` Jonathan Nieder
2011-06-21 0:24 ` Andi Kleen
2011-06-21 5:00 ` Jonathan Nieder
2011-06-20 23:26 ` Junio C Hamano
2011-06-21 0:17 ` Andi Kleen
2011-06-20 21:53 ` Junio C Hamano
2011-06-20 22:00 ` Andi Kleen
2011-06-20 22:30 ` Junio C Hamano
2011-06-20 22:33 ` Andi Kleen
2011-06-21 4:11 ` Junio C Hamano
2011-06-19 1:07 ` [PATCH 3/3] Add profile feedback build to git v2 Andi Kleen
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=7vfwn4b1vb.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=ak@linux.intel.com \
--cc=andi@firstfloor.org \
--cc=git@vger.kernel.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 NNTP newsgroup(s).