summaryrefslogtreecommitdiffstats
path: root/src/util/macros.h
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-08-16 17:16:45 -0700
committerJason Ekstrand <[email protected]>2017-12-04 09:21:09 -0800
commit0c49aa0624c289164b5501a8724b6d9fdbae7f49 (patch)
tree55af9d527c5cd4820db9a415d2be7003be4adf49 /src/util/macros.h
parent591a07632c913cadb1802196c0a50480b354d73c (diff)
util: Add a NORETURN macro
Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/util/macros.h')
-rw-r--r--src/util/macros.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/util/macros.h b/src/util/macros.h
index aa36253217c..d6e37053b15 100644
--- a/src/util/macros.h
+++ b/src/util/macros.h
@@ -171,6 +171,12 @@ do { \
#define ATTRIBUTE_RETURNS_NONNULL
#endif
+#ifdef HAVE_FUNC_ATTRIBUTE_NORETURN
+#define NORETURN __attribute__((__noreturn__))
+#else
+#define NORETURN
+#endif
+
#ifdef __cplusplus
/**
* Macro function that evaluates to true if T is a trivially