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

3 messages, 3 authors, 2021-11-23 · open the first message on its own page

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

From: Junio C Hamano <hidden>
Date: 2021-11-22 22:10:19

Johannes Schindelin [off-list ref] writes:
quoted
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.

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

From: Carlo Arenas <hidden>
Date: 2021-11-22 22:23:36

On Mon, Nov 22, 2021 at 2:10 PM Junio C Hamano [off-list ref] wrote:
Johannes Schindelin [off-list ref] writes:
quoted
quoted
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

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

From: Johannes Schindelin <hidden>
Date: 2021-11-23 12:33:06

Hi Junio,

On Mon, 22 Nov 2021, Junio C Hamano wrote:
Johannes Schindelin [off-list ref] writes:
quoted
quoted
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 thought we were only dropping the `--std=gnu99` part, not the change to
the `git-compat-util.h` header file, nor the patch to the CMake
configuration for MS Visual C.

Ciao,
Dscho
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help