summaryrefslogtreecommitdiff
path: root/lib/compiler.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compiler.h')
-rw-r--r--lib/compiler.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/compiler.h b/lib/compiler.h
index b5cfbefeb5..ab95aa09c0 100644
--- a/lib/compiler.h
+++ b/lib/compiler.h
@@ -136,6 +136,9 @@ extern "C" {
#define macro_inline static inline __attribute__((unused))
#define macro_pure static inline __attribute__((unused, pure))
+/* if the macro ends with a function definition */
+#define MACRO_REQUIRE_SEMICOLON() \
+ _Static_assert(1, "please add a semicolon after this macro")
/* variadic macros, use like:
* #define V_0() ...