aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/common.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/common.h b/include/common.h
index d609257..2ce5d22 100644
--- a/include/common.h
+++ b/include/common.h
@@ -129,6 +129,13 @@ extern "C" {
fprintf(stderr, "%s: warning!: " fmt "\n", PROGRAM_NAME, ##__VA_ARGS__); \
} while(0)
+/* for tagging functions that always exit */
+#if defined(__GNUC__) || defined(__clang__)
+ #define NORETURN __attribute__((noreturn))
+#else
+ #define NORETURN
+#endif
+
/**
* prompt the user for confirmation
*/