aboutsummaryrefslogtreecommitdiff
path: root/src/include/assert.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/assert.h')
-rw-r--r--src/include/assert.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/include/assert.h b/src/include/assert.h
index dd71fa7..6d05318 100644
--- a/src/include/assert.h
+++ b/src/include/assert.h
@@ -56,6 +56,15 @@ assert_printf ( const char *fmt, ... ) asm ( "printf" );
} while ( 0 )
/**
+ * Assert a condition at build time
+ *
+ * If the compiler cannot prove that the condition is true, the build
+ * will fail with an error message.
+ */
+#undef static_assert
+#define static_assert(x) _Static_assert( x, #x )
+
+/**
* Assert a condition at link-time.
*
* If the condition is not true, the link will fail with an unresolved