Better error message for UC_STATIC_ASSERT. Also

require it to be terminated by a ;
This commit is contained in:
Nils O. Selåsdal
2014-03-14 00:58:09 +01:00
parent b93e5b6d5b
commit 71c9643ee9
+2 -3
View File
@@ -6,9 +6,8 @@
//Gnerate a compiler error if the compile time //Gnerate a compiler error if the compile time
//constant expression fails //constant expression fails
#define UC_STATIC_ASSERT(expr) \ #define UC_STATIC_ASSERT(expr)\
enum { assert_static__ = 1/(expr) }; typedef int STATIC_ASSERT_FAILED[(expr) ? 1 : -1]
//MAX of a and b //MAX of a and b
#define UC_MAX(a,b) \ #define UC_MAX(a,b) \