Merge branch 'static-assert' into 'master'

Implement static_assert

See merge request redox-os/relibc!1355
This commit is contained in:
Jeremy Soller
2026-05-19 06:03:05 -06:00
2 changed files with 5 additions and 0 deletions
+4
View File
@@ -12,6 +12,10 @@ trailer = """
#undef assert
#endif
#if __STDC_VERSION__ >= 201112L && !defined(__cplusplus)
#define static_assert _Static_assert
#endif
#ifdef NDEBUG
# define assert(cond) (void) 0
#else
+1
View File
@@ -7,6 +7,7 @@
int main(void) {
assert(1 == 1);
assert(1 + 1 == 2);
static_assert(3 == 3);
puts("yay!");
if (assert(0 == 0), 1) {