Re: [PATCH] git-compat-util(msvc): C11 does not imply support for zero-sized arrays
- From
- Neeraj 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)