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. --- build/flags/std.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 build/flags/std.c (limited to 'build/flags') diff --git a/build/flags/std.c b/build/flags/std.c new file mode 100644 index 0000000..6030d1f --- /dev/null +++ b/build/flags/std.c @@ -0,0 +1,12 @@ +// Copyright © Tavian Barnes +// SPDX-License-Identifier: 0BSD + +/// _CFLAGS += -std=c23 +/// --- +/// _CFLAGS += -std=c2x +/// --- +/// _CFLAGS += -std=c17 + +int main(void) { + return 0; +} -- cgit v1.2.3