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

Re: Compilation errors in git.pu/refs/reftable-backend.c

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Apr 27, 2020, 23:26 UTC
Message-ID
<20200427232629.GI6421@camp.crustytoothpaste.net>
In-Reply-To
<20200427131312.GB61348@Carlos-MBP>
On 2020-04-27 at 13:13:12, Carlo Marcelo Arenas Belón wrote:
Show 10 quoted lines
> On Mon, Apr 27, 2020 at 02:05:12PM +0200, Han-Wen Nienhuys wrote:
> > 
> > I don't understand why Git doesn't enforce this, though.  Couldn't
> > -Wdeclaration-after-statement be added to the Makefile if the compiler
> > supported it?
> 
> not sure if that flag will catch it, but from what I recall, that
> specific feature was only available in C99 while git's codebase
> targets C89 (need to build with --std=gnu89 as some GNU extensions
> are already needed).

I think we had chosen to preserve this behavior because MSVC didn't support C99. We may wish to change our approach now that MSVC supports a reasonable subset of it and GCC and Clang are available for almost every system out there.

I don't think it's unreasonable to expect folks to use a compiler supporting a standard that is now more than two decades old.

Of course, that doesn't affect the present series, but it is a thing we should consider.

-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
Previous: Carlo Marcelo Arenas Belón
Message 5 of 5 in “Compilation errors in git.pu/refs/reftable-backend.c”
  1. Torsten BögershausenApr 27, 2020
  2. Han-Wen NienhuysApr 27, 2020
  3. Jeff KingApr 27, 2020
  4. Carlo Marcelo Arenas BelónApr 27, 2020
  5. brian m. carlsonApr 27, 2020

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.