summaryrefslogtreecommitdiffstats
path: root/build/flags
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2025-07-09 10:22:00 -0400
committerTavian Barnes <tavianator@tavianator.com>2025-07-26 14:19:51 -0400
commit1b1e5a4707d681e4b38df56e83db1be9c07723b8 (patch)
tree818d23177c1b2ab338c28ad84ff4a496dc0c9602 /build/flags
parent54260a40b37890bb6ee3b62659abd3b13c89a0aa (diff)
downloadbfs-1b1e5a4707d681e4b38df56e83db1be9c07723b8.tar.xz
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.
Diffstat (limited to 'build/flags')
-rw-r--r--build/flags/std.c12
1 files changed, 12 insertions, 0 deletions
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 <tavianator@tavianator.com>
+// SPDX-License-Identifier: 0BSD
+
+/// _CFLAGS += -std=c23
+/// ---
+/// _CFLAGS += -std=c2x
+/// ---
+/// _CFLAGS += -std=c17
+
+int main(void) {
+ return 0;
+}