From 1b1e5a4707d681e4b38df56e83db1be9c07723b8 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 9 Jul 2025 10:22:00 -0400 Subject: build: Use C23 if possible For broader compiler support, we try both -std=c23 and -std=c2x. If neither is supported, we fall back to -std=c17, but we will start requiring some C23 features as extensions in this mode. --- docs/CONTRIBUTING.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 099157d..e411fde 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -17,7 +17,8 @@ This enables machine processing of license information based on the SPDX License Implementation -------------- -`bfs` is written in [C](https://en.wikipedia.org/wiki/C_(programming_language)), specifically [C17](https://en.wikipedia.org/wiki/C17_(C_standard_revision)). +`bfs` is written in [C](https://en.wikipedia.org/wiki/C_(programming_language)). +The build defaults to [C23](https://en.wikipedia.org/wiki/C23_(C_standard_revision)), but it also supports [C17](https://en.wikipedia.org/wiki/C17_(C_standard_revision)) as long as some popular C23 features are available as extensions. You can get a feel for the coding style by skimming the source code. [`main.c`](/src/main.c) contains an overview of the rest of source files. A quick summary: -- cgit v1.2.3