diff --git a/include/ucore/utils.h b/include/ucore/utils.h index e2b6592..70e5ca9 100644 --- a/include/ucore/utils.h +++ b/include/ucore/utils.h @@ -6,9 +6,8 @@ //Gnerate a compiler error if the compile time //constant expression fails -#define UC_STATIC_ASSERT(expr) \ - enum { assert_static__ = 1/(expr) }; - +#define UC_STATIC_ASSERT(expr)\ + typedef int STATIC_ASSERT_FAILED[(expr) ? 1 : -1] //MAX of a and b #define UC_MAX(a,b) \