From 30618c586caa6ffc67d263686f85ba65aa4e0e54 Mon Sep 17 00:00:00 2001 From: Explorer09 Date: Mon, 22 Apr 2024 18:32:23 +0800 Subject: Update '__STDC_VERSION__' check with C23 `__STDC_VERSION__` will be defined as 202311L for C23. --- Compat.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Compat.h b/Compat.h index 2bc12dc6..02b2fcb2 100644 --- a/Compat.h +++ b/Compat.h @@ -74,9 +74,8 @@ ssize_t Compat_readlink(openat_arg_t dirfd, # endif #endif -/* C23 will guarantee static_assert is a keyword or a macro */ -/* FIXME: replace 202300L with proper value once C23 is published */ -#if (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 202300L +/* C23 guarantees static_assert is a keyword or a macro */ +#if (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 202311L # if !defined(static_assert) # define static_assert(expr, msg) _Static_assert(expr, msg) # endif -- cgit v1.2.3