Skip to content

Commit 30618c5

Browse files
Explorer09BenBE
authored andcommitted
Update '__STDC_VERSION__' check with C23
`__STDC_VERSION__` will be defined as 202311L for C23.
1 parent 4c0e965 commit 30618c5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Compat.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,8 @@ ssize_t Compat_readlink(openat_arg_t dirfd,
7474
# endif
7575
#endif
7676

77-
/* C23 will guarantee static_assert is a keyword or a macro */
78-
/* FIXME: replace 202300L with proper value once C23 is published */
79-
#if (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 202300L
77+
/* C23 guarantees static_assert is a keyword or a macro */
78+
#if (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 202311L
8079
# if !defined(static_assert)
8180
# define static_assert(expr, msg) _Static_assert(expr, msg)
8281
# endif

0 commit comments

Comments
 (0)