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

Re: return void expressions in C (Was: [PATCH 3/6] Rework pretty_print_commit ...)

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Sep 27, 2007, 22:56 UTC
Message-ID
<alpine.LFD.0.999.0709271554560.3579@woody.linux-foundation.org>
In-Reply-To
<20070910183256.GD32442@artemis.corp>
On Mon, 10 Sep 2007, Pierre Habouzit wrote:
>
>   Okay, I stand corrected, but as I'm curious, I've now the Truth about
> this, for those who still care at that point (as the patch has been
> fixed in the next round anyways ;p)
The
	void fn1(void);
	void fn2(void)
	{
		return fn1();
	}

thing is a gcc extension. It happens to be one we use in the kernel too, since it makes for nicer-looking source code in some circumstances, but it's definitely nonstandard.

		Linus
Previous: Pierre Habouzit
Message 9 of 9 in “Use more strbufs series [on top of next]”
  1. Pierre HabouzitSep 9, 2007
  2. 1/6 Add strbuf_rtrim and strbuf_insert.Pierre Habouzit, Sep 9, 2007
  3. 2/6 Change semantics of interpolate to work like snprintf.Pierre Habouzit, Sep 9, 2007
  4. 3/6 Rework pretty_print_commit to use strbufs instead of custom buffers.Pierre Habouzit, Sep 9, 2007
  5. 4/6 Use strbuf_read in builtin-fetch-tool.c.Pierre Habouzit, Sep 9, 2007
  6. 5/6 Use strbufs to in read_message (imap-send.c), custom buffer--.Pierre Habouzit, Sep 9, 2007
  7. 6/6 Replace all read_fd use with strbuf_read, and get rid of it.Pierre Habouzit, Sep 9, 2007
  8. Pierre HabouzitSep 9, 2007
  9. Linus TorvaldsSep 27, 2007

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.