git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/3] Add a lot of dummy returns to avoid warnings with NO_NORETURN

From
AKAndi Kleen <andi@firstfloor.org>
Date
Jun 20, 2011, 21:30 UTC
Message-ID
<20110620213001.GB32765@one.firstfloor.org>
In-Reply-To
<7vsjr4b3tf.fsf@alter.siamese.dyndns.org>
On Mon, Jun 20, 2011 at 02:17:32PM -0700, Junio C Hamano wrote:
Show 10 quoted lines
> 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?

FWIW I preferred my original minimal patch and I can go back to that one.
> temporary workaround until gcc 4.6 is fixed. With -Wunreachable-code on,

gcc mainline (and possibly 4.6.2) has it already fixed, but it's reasonable to assume 4.6.0 will be in use for a long time. There's nothing "temporary" about compiler workarounds, unless you wait 10 years or so.

> 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. 
-Andi
-- 
ak@linux.intel.com -- Speaking for myself only.
Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 20 in “Add option to disable NORETURN”
  1. 1/3 Add option to disable NORETURNAndi Kleen, Jun 19, 2011
  2. 2/3 Add a lot of dummy returns to avoid warnings with NO_NORETURNAndi Kleen, Jun 19, 2011
  3. Junio C HamanoJun 20, 2011
  4. Andi KleenJun 20, 2011
  5. Junio C HamanoJun 20, 2011
  6. Andi KleenJun 20, 2011
  7. Jonathan NiederJun 20, 2011
  8. Andi KleenJun 20, 2011
  9. Jonathan NiederJun 20, 2011
  10. Jonathan NiederJun 20, 2011
  11. Andi KleenJun 21, 2011
  12. Jonathan NiederJun 21, 2011
  13. Junio C HamanoJun 20, 2011
  14. Andi KleenJun 21, 2011
  15. Junio C HamanoJun 20, 2011
  16. Andi KleenJun 20, 2011
  17. Junio C HamanoJun 20, 2011
  18. Andi KleenJun 20, 2011
  19. Junio C HamanoJun 21, 2011
  20. 3/3 Add profile feedback build to git v2Andi Kleen, Jun 19, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.