Re: [PATCH 1/1] git-compat-util: add a test balloon for C99 support
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 17, 2021, 08:29 UTC
- Message-ID
- <xmqqk0h7423v.fsf@gitster.g>
- In-Reply-To
- <nycvar.QRO.7.76.6.2111161129120.21127@tvgsbejvaqbjf.bet>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 10 quoted lines
>> Even MSVC, long a holdout against modern C, now supports both C11 and >> C17 with an appropriate update. Moreover, even if people are using an >> older version of MSVC on these systems, they will generally need some >> implementation of the standard Unix utilities for the testsuite, and GNU >> coreutils, the most common option, has required C99 since 2009. >> Therefore, we can safely assume that a suitable version of GCC or clang >> is available to users even if their version of MSVC is not sufficiently >> capable. > > I am all in favor of this patch!
I like the direction, but ...
Show 10 quoted lines
>> diff --git a/Makefile b/Makefile >> index 12be39ac49..22d9e67542 100644 >> --- a/Makefile >> +++ b/Makefile >> @@ -1204,7 +1204,7 @@ endif >> # Set CFLAGS, LDFLAGS and other *FLAGS variables. These might be >> # tweaked by config.* below as well as the command-line, both of >> # which'll override these defaults. >> -CFLAGS = -g -O2 -Wall >> +CFLAGS = -g -O2 -Wall -std=gnu99
... as has been already pointed out, this part probably should not be there. It is not our intention to require gcc/clang, or to constrain newer systems to gnu99.