git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 0/1] Add a test balloon for C99
@ 2021-11-14 21:24 brian m. carlson
  2021-11-14 21:24 ` [PATCH 1/1] git-compat-util: add a test balloon for C99 support brian m. carlson
                   ` (5 more replies)
  0 siblings, 6 replies; 40+ messages in thread
From: brian m. carlson @ 2021-11-14 21:24 UTC (permalink / raw)
  To: git

The C99 standard, more formally known as ISO/IEC 9899:1999, was, as its
name suggests, was ratified in 1999, more than 20 years ago[0].  It has
a variety of nice features, including loop variable initialization, that
are available to most modern programmers.

In fact, POSIX 1003.1-2001 and the Single Unix Specification version 3,
made its use mandatory through the c99 command.  As a practical matter,
all known Unix systems which receive security support have support for
these standards or their successors, POSIX 1003.1-2018 and the Single
Unix Specification version 4, and as such, we can safely assume support
for C99 there.

Unfortunately, Microsoft for many years refused[1] to support C99 in
MSVC, and still does not officially do so.  However, they recently added
support for C11 and C17, which are sufficient for modern programming.
These require a newer version of MSVC, including an updated SDK.  The
SDK update is available for download free of charge, and most public CI
systems have support for both the updated MSVC and the SDK update.

Even for users who would like to target an older version of Windows,
such as the no longer supported Windows 7, GCC and Clang are available.
The LLVM suite, including Clang, is available pre-compiled for download
free of charge.  Using a different compiler is specifically proposed by
Microsoft staff[1] as a solution for users who wish to build modern
programs for MSVC versions which do not support modern C.

As such, we can assume that Git can be safely compiled with C99 or C11
support on all operating systems which receive security support, and
even some which do not.  Our CI confirms that this series passes all
tests.  Let's introduce a test balloon which checks for this support and
fails with an error message if it is absent.

[0] The reader will note that there are people working professionally in
this industry who were not yet born at the time C99 was ratified.  Thus,
this occurred quite a long time ago indeed.
[1] https://herbsutter.com/2012/05/03/reader-qa-what-about-vc-and-c99/

brian m. carlson (1):
  git-compat-util: add a test balloon for C99 support

 Makefile                            |  4 ++--
 contrib/buildsystems/CMakeLists.txt |  3 +--
 git-compat-util.h                   | 12 ++++++++++++
 3 files changed, 15 insertions(+), 4 deletions(-)


^ permalink raw reply	[flat|nested] 40+ messages in thread
[parent not found: <20211114211622.1465981-1-sandals@crustytoothpaste.net>]

end of thread, other threads:[~2021-12-02 17:38 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-14 21:24 [PATCH 0/1] Add a test balloon for C99 brian m. carlson
2021-11-14 21:24 ` [PATCH 1/1] git-compat-util: add a test balloon for C99 support brian m. carlson
2021-11-15  1:14   ` Ævar Arnfjörð Bjarmason
2021-11-15  1:54     ` brian m. carlson
2021-11-15  3:16   ` Eric Sunshine
2021-11-16  1:53     ` brian m. carlson
2021-11-22 11:47   ` Johannes Schindelin
2021-11-14 21:43 ` [PATCH 0/1] Add a test balloon for C99 brian m. carlson
2021-11-15  7:00 ` Junio C Hamano
2021-11-15 22:41   ` brian m. carlson
2021-11-16 19:02     ` Junio C Hamano
2021-11-17  1:51       ` brian m. carlson
2021-11-16  2:12 ` [PATCH v2 0/1] Add a test balloon for C99 support brian m. carlson
2021-11-16  2:12   ` [PATCH v2 1/1] git-compat-util: add " brian m. carlson
2021-11-16 12:19     ` Jeff King
2021-11-16 12:54       ` Ævar Arnfjörð Bjarmason
2021-11-16 14:54         ` Jeff King
2021-11-17  2:53           ` brian m. carlson
2021-11-17  3:01             ` Jeff King
2021-11-17 23:18               ` brian m. carlson
2021-11-17 23:45                 ` Carlo Arenas
2021-11-18  2:26                   ` Ævar Arnfjörð Bjarmason
2021-11-18 19:10                 ` Junio C Hamano
2021-11-17  8:49           ` Junio C Hamano
2021-11-16 19:44       ` Phillip Wood
2021-11-17  1:44       ` brian m. carlson
2021-11-17  2:58         ` Jeff King
2021-11-30 20:43 ` Microsoft's C language policy (was: [PATCH 0/1] Add a test balloon for C99) Ævar Arnfjörð Bjarmason
2021-11-30 22:37   ` brian m. carlson
2021-12-01  1:40 ` [PATCH v3 0/1] Add a test balloon for C99 support brian m. carlson
2021-12-01  1:40   ` [PATCH v3 1/1] git-compat-util: add " brian m. carlson
2021-12-02 17:38     ` Johannes Schindelin
     [not found] <20211114211622.1465981-1-sandals@crustytoothpaste.net>
     [not found] ` <20211114211622.1465981-2-sandals@crustytoothpaste.net>
2021-11-16 10:30   ` [PATCH " Johannes Schindelin
2021-11-17  8:29     ` Junio C Hamano
2021-11-22 11:44       ` Johannes Schindelin
2021-11-22 13:05         ` Ævar Arnfjörð Bjarmason
2021-11-22 17:27         ` Junio C Hamano
2021-11-22 17:52           ` Carlo Arenas
2021-11-22 18:58             ` Junio C Hamano
2021-11-22 20:52               ` Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).