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

Re: [PATCH 1/2] Remove noreturn function pointers in usage.c

From
AKAndi Kleen <andi@firstfloor.org>
Date
Jun 9, 2011, 04:59 UTC
Message-ID
<20110609045915.GA15448@one.firstfloor.org>
In-Reply-To
<7v4o3z264s.fsf@alter.siamese.dyndns.org>
Show 5 quoted lines
>  - There are many more NORETURN and NORETURN_PTR in the code, and the
>    proposed commit log message does not explain why these two are the only
>    ones that are problematic and needs to be worked around. It does not
>    guide other people who might want to add NORETURN/NORETURN_PTR when
>    deciding if their change would break the "fix" this change brought in.
This was the only place where it crashed the compiler.

I don't have a good criterium to decide which cases do crash the compiler or not except for trying it.

But I believe the crash is relatively unlikely (needs quite a lot of conditions to line up), so it doesn't deserve extensive changes all over.

> 
>  - 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)

Show 6 quoted lines
> 
>  - If other NORETURN/NORETURN_PTR could/should also go (I don't know due
>    to the first bullet point above) when using the problematic compiler
>    with the profile feedback feature, wouldn't it be a better workaround
>    would be to introduce a Makefile variable to ask git-compat-util.h to
>    make these two a no-op, perhaps?
I don't think we need to remove the others for now.
Show 6 quoted lines
> 
> A patch to do so may look like this.
> 
> I did not like the triple negation "make NO_NORETURN=NoThanks" and wanted
> to name this AVOID_NORETURN instead, but decided to go with other existing
> Makefile variables.

Given the explanation above (I can update the description with that) do you still want the complete disabling?

-Andi
Previous: Junio C HamanoNext: Jeff King
Message 4 of 7 in “Remove noreturn function pointers in usage.c”
  1. 1/2 Remove noreturn function pointers in usage.cAndi Kleen, Jun 8, 2011
  2. 2/2 Add profile feedback build to gitAndi Kleen, Jun 8, 2011
  3. Junio C HamanoJun 9, 2011
  4. Andi KleenJun 9, 2011
  5. Jeff KingJun 9, 2011
  6. Andi KleenJun 9, 2011
  7. Erik Faye-LundJun 9, 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.