From: Jonathan Nieder <jrnieder@gmail.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: Junio C Hamano <gitster@pobox.com>,
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 17:46:19 -0500 [thread overview]
Message-ID: <20110620224619.GB695@elie> (raw)
In-Reply-To: <20110620223705.GG32765@one.firstfloor.org>
Andi Kleen wrote:
> To be honest it's still not clear to me what was wrong with patch (2).
Ah, ok. From my point of view the patch was problematic since it adds
code that would be distracting to both humans and static analyzers.
For example, a person might wonder "why this return value and not
another?". Even worse, if someone removes a die() call and introduces
a bug, we lose the benefit of the warnings you are suppressing.
>> In this case, since the NO_NORETURN knob is to work around a gcc bug,
>> wouldn't it make sense to add a -Wno-something-or-other option to
>> BASIC_CFLAGS or COMPAT_CFLAGS when it is set?
>
> The problem is that only relatively new gccs have options to do
> fine grained control on all warnings. So this would add more complications
> in the Makefile to check the compiler version
The default CFLAGS is very simple because git is supposed to be
possible to build with other compilers, too, and I wasn't suggesting
changing that. But I suspect making NO_NORETURN assume a modern
enough gcc to trigger the bug might be ok.
Anyway, thanks for writing these patches. I'm happy to see git get
faster. As a side question, do you know if gcc provides a way to
print output about what profile-driven optimizations were especially
compelling, so they could help people think about how to reorganize
code to improve the non profile-driven builds, too?
Regards,
Jonathan
next prev parent reply other threads:[~2011-06-20 22:46 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
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 [this message]
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=20110620224619.GB695@elie \
--to=jrnieder@gmail.com \
--cc=ak@linux.intel.com \
--cc=andi@firstfloor.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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).