diff --git a/include/spdk/assert.h b/include/spdk/assert.h index 2f3d03db6..1bdc1cb73 100644 --- a/include/spdk/assert.h +++ b/include/spdk/assert.h @@ -47,6 +47,14 @@ extern "C" { #ifdef static_assert #define SPDK_STATIC_ASSERT(cond, msg) static_assert(cond, msg) #else +/** + * Compatibility wrapper for static_assert. + * + * This won't actually enforce the condition when compiled with an environment that doesn't support + * C11 static_assert; it is only intended to allow end users with old compilers to build the package. + * + * Developers should use a recent compiler that provides static_assert. + */ #define SPDK_STATIC_ASSERT(cond, msg) #endif