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

Re: [PATCH] git-compat-util(msvc): C11 does not imply support for zero-sized arrays

From
NSNeeraj Singh <nksingh85@gmail.com>
Date
Dec 6, 2021, 22:25 UTC
Message-ID
<20211206222539.GA27821@neerajsi-x1.localdomain>
In-Reply-To
<pull.1094.git.1638823724410.gitgitgadget@gmail.com>

I'm a little confused by this issue. Looks like an empty flex array is supported here: https://godbolt.org/z/j3ndYTEfx. (Note that I'm passing /TC to force C compilation).

Also, heap_fsentry doesn't appear to use a flex array in current sources.

If it does start using it, there issue may actually be elsewhere besides the struct definition (it could be just a badly targeted compiler error). We have code like `struct heap_fsentry key[2];`. That declaration can't work with a flex array.

Thanks, Neeraj (wearing the ex-MSVC dev hat)

Previous: Junio C HamanoNext: Johannes Schindelin
Message 3 of 10 in “git-compat-util(msvc): C11 does not imply support for zero-sized arrays”
  1. git-compat-util(msvc): C11 does not imply support for zero-sized arraysJohannes Schindelin via GitGitGadget, Dec 6, 2021
  2. Junio C HamanoDec 6, 2021
  3. Neeraj SinghDec 6, 2021
  4. Johannes SchindelinDec 7, 2021
  5. Neeraj SinghDec 7, 2021
  6. rsbecker@nexbridge.comDec 7, 2021
  7. Phillip WoodDec 9, 2021
  8. Junio C HamanoDec 9, 2021
  9. Junio C HamanoDec 9, 2021
  10. Neeraj SinghDec 9, 2021

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.