[PATCH] assert: Add static_assert macro

See the C11 standard 7.2 §3 The definition is copied from glibc. --- include/assert.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/assert.h b/include/assert.h index ee8e85fa2..fd71e833b 100644 --- a/include/assert.h +++ b/include/assert.h @@ -76,3 +76,8 @@ __END_DECLS # endif #endif /* NDEBUG. */ + +#if defined __USE_ISOC11 && !defined __cplusplus +# undef static_assert +# define static_assert _Static_assert +#endif -- 2.36.1

Hi, applied and pushed, thx Waldemar Nicolas Cavallari wrote,
See the C11 standard 7.2 §3
The definition is copied from glibc. --- include/assert.h | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/include/assert.h b/include/assert.h index ee8e85fa2..fd71e833b 100644 --- a/include/assert.h +++ b/include/assert.h @@ -76,3 +76,8 @@ __END_DECLS # endif
#endif /* NDEBUG. */ + +#if defined __USE_ISOC11 && !defined __cplusplus +# undef static_assert +# define static_assert _Static_assert +#endif -- 2.36.1
_______________________________________________ devel mailing list -- devel@uclibc-ng.org To unsubscribe send an email to devel-leave@uclibc-ng.org
participants (2)
-
Nicolas Cavallari
-
Waldemar Brodkorb