/* Compile-time assertions for C99 targets; no runtime storage or code. */ #ifndef IEC60870_STATIC_ASSERT_H #define IEC60870_STATIC_ASSERT_H #if !defined(__cplusplus) && (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L) #define IEC60870_ASSERT_JOIN_INNER(a, b) a##b #define IEC60870_ASSERT_JOIN(a, b) IEC60870_ASSERT_JOIN_INNER(a, b) /* A false constant expression produces an invalid negative array bound. */ #define _Static_assert(condition, message) \ typedef char IEC60870_ASSERT_JOIN(iec60870_static_assert_, __LINE__)[(condition) ? 1 : -1] #endif #endif /* IEC60870_STATIC_ASSERT_H */