|
@@ -517,7 +517,8 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s
|
|
|
# define __compiletime_error_fallback(condition) do { } while (0)
|
|
|
#endif
|
|
|
|
|
|
-#define __compiletime_assert(condition, msg, prefix, suffix) \
|
|
|
+#ifdef __OPTIMIZE__
|
|
|
+# define __compiletime_assert(condition, msg, prefix, suffix) \
|
|
|
do { \
|
|
|
bool __cond = !(condition); \
|
|
|
extern void prefix ## suffix(void) __compiletime_error(msg); \
|
|
@@ -525,6 +526,9 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s
|
|
|
prefix ## suffix(); \
|
|
|
__compiletime_error_fallback(__cond); \
|
|
|
} while (0)
|
|
|
+#else
|
|
|
+# define __compiletime_assert(condition, msg, prefix, suffix) do { } while (0)
|
|
|
+#endif
|
|
|
|
|
|
#define _compiletime_assert(condition, msg, prefix, suffix) \
|
|
|
__compiletime_assert(condition, msg, prefix, suffix)
|