#endif
#ifndef __cplusplus
-/* Build-time assertion for use in a statement context. */
-#define BUILD_ASSERT(EXPR) \
+/* Build-time assertion building block. */
+#define BUILD_ASSERT__(EXPR) \
sizeof(struct { unsigned int build_assert_failed : (EXPR) ? 1 : -1; })
+/* Build-time assertion for use in a statement context. */
+#define BUILD_ASSERT(EXPR) (void) BUILD_ASSERT__(EXPR)
+
/* Build-time assertion for use in a declaration context. */
#define BUILD_ASSERT_DECL(EXPR) \
- extern int (*build_assert(void))[BUILD_ASSERT(EXPR)]
+ extern int (*build_assert(void))[BUILD_ASSERT__(EXPR)]
#else /* __cplusplus */
#include <boost/static_assert.hpp>
#define BUILD_ASSERT BOOST_STATIC_ASSERT