summaryrefslogtreecommitdiffstats
path: root/assert/assert.h
diff options
context:
space:
mode:
Diffstat (limited to 'assert/assert.h')
-rw-r--r--assert/assert.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/assert/assert.h b/assert/assert.h
index 67f1cce5e9..b438d8eeb7 100644
--- a/assert/assert.h
+++ b/assert/assert.h
@@ -135,7 +135,11 @@ __END_DECLS
#endif /* NDEBUG. */
-#if defined __USE_ISOC11 && !defined __cplusplus
+#if (defined __USE_ISOC11 \
+ && (!defined __STDC_VERSION__ \
+ || __STDC_VERSION__ <= 201710L \
+ || !__GNUC_PREREQ (13, 0)) \
+ && !defined __cplusplus)
# undef static_assert
# define static_assert _Static_assert
#endif