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

Re: [PATCH 2/2] add NORETURN_PTR for function pointers

From
Jeff King <peff@peff.net>
Date
Oct 1, 2009, 08:17 UTC
Message-ID
<20091001081710.GC13436@coredump.intra.peff.net>
In-Reply-To
<1254333950-2440-2-git-send-email-kusmabite@gmail.com>
On Wed, Sep 30, 2009 at 06:05:50PM +0000, Erik Faye-Lund wrote:
Show 6 quoted lines
> Some compilers (including at least MSVC and ARM RVDS) supports
> NORETURN on function declarations, but not on function pointers.
> 
> This patch makes it possible to define NORETURN for these compilers,
> by splitting the NORETURN macro into two - one for function
> declarations and one for function pointers.

Thanks, this version and (your 1/2) both look sane to me. The only thing missing are some Makefile knobs to tweak this, but I will assume that will come as part of a later MSVC-compatibility series.

Shawn, this can go straight to 'next', if not 'master'. The changes should be a no-op for most platforms. The only danger would be if there is some platform that doesn't like their NORETURN magic at the front of the function declaration. But we only define it by default for __GNUC__, so I suspect we're safe.

In my tree as ef/msvc-noreturn.
-Peff
Previous: Erik Faye-LundNext: Erik Faye-Lund
Message 3 of 5 in “increase portability of NORETURN declarations”
  1. 1/2 increase portability of NORETURN declarationsErik Faye-Lund, Sep 30, 2009
  2. 2/2 add NORETURN_PTR for function pointersErik Faye-Lund, Sep 30, 2009
  3. Jeff KingOct 1, 2009
  4. Erik Faye-LundOct 1, 2009
  5. Jeff KingOct 2, 2009

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.