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

Re: [PATCH 1/1] git-compat-util: add a test balloon for C99 supporty

From
Carlo Arenas <carenas@gmail.com>
Date
Nov 22, 2021, 22:22 UTC
Message-ID
<CAPUEspjj4bpnRsr=vpnzuvoHqw9A19fpPcX65oSHZryiyKXxEg@mail.gmail.com>
In-Reply-To
<xmqqwnkzdepm.fsf@gitster.g>
On Mon, Nov 22, 2021 at 2:10 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 17 quoted lines
>
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>
> >> But if we were to do so, perhaps we'd want something like what I
> >> gave at https://lore.kernel.org/git/xmqqy25lwa86.fsf@gitster.g/ in
> >> its place to avoid confusing people.
> >
> > That sounds like a good course of action to me.
> >
> > Please note that the MSVC-related adjustment of the `FLEX_ARRAY` block is
> > still needed, I think.
>
> The "something like what I gave ... to avoid confusing people" patch
> is following up on the direction to drop the patch with -std=gnu99
> change.  IIRC, your MSVC adjustment was to tweak that patch we were
> discussing of dropping, so even if it is still needed, it won't be
> part of what I was doing.

I think it will still be needed, I have somewhere indeed a bugfix (which I never got back to clean up enough for sending) to that section because it was not C89 safe either, which is what dscho is likely fixing from the point of view of MSVC that doesn't support the GNU syntax that we use as a fallback eagerly than we should.

FWIW I got the chance to try to build in a long unmaintained debian 6 (AKA squeeze) with gcc 4.4.5 and was greeted by the following edited message:

  error: 'for' loop initial declarations are only allowed in C99 mode
  note: use option -std=c99 or -std=gnu99 to compile your code

So I think whatever we do, likely it wouldn't be confusing to whoever is affected.

Carlo
Previous: Junio C HamanoNext: Johannes Schindelin
Message 11 of 14 in “Re: [PATCH 1/1] git-compat-util: add a test balloon for C99 support”
  1. Johannes SchindelinNov 16, 2021
  2. Junio C HamanoNov 17, 2021
  3. Johannes SchindelinNov 22, 2021
  4. Ævar Arnfjörð BjarmasonNov 22, 2021
  5. Junio C HamanoNov 22, 2021
  6. Carlo ArenasNov 22, 2021
  7. Junio C HamanoNov 22, 2021
  8. Junio C HamanoNov 22, 2021
  9. Johannes SchindelinNov 22, 2021
  10. Junio C HamanoNov 22, 2021
  11. Carlo ArenasNov 22, 2021
  12. Johannes SchindelinNov 23, 2021
  13. Junio C HamanoNov 23, 2021
  14. brian m. carlsonNov 24, 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.