From 22bfbdbc020bf42622bbeb1e70df6cd2a692136f Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Sun, 21 Jul 2024 10:08:01 +0200 Subject: [PATCH] stdinc: c23 deprecated _Static_assert in favor of static_assert --- include/SDL3/SDL_stdinc.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/SDL3/SDL_stdinc.h b/include/SDL3/SDL_stdinc.h index 9bda34463a..7b6088f2fb 100644 --- a/include/SDL3/SDL_stdinc.h +++ b/include/SDL3/SDL_stdinc.h @@ -461,10 +461,8 @@ typedef Sint64 SDL_Time; #endif /* SDL_DISABLE_ANALYZE_MACROS */ #ifndef SDL_COMPILE_TIME_ASSERT -#ifdef __cplusplus -#if (__cplusplus >= 201103L) +#if (defined(__cplusplus) && __cplusplus >= 201103L) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L) #define SDL_COMPILE_TIME_ASSERT(name, x) static_assert(x, #x) -#endif #elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) #define SDL_COMPILE_TIME_ASSERT(name, x) _Static_assert(x, #x) #endif