diff options
author | Jason Ekstrand <[email protected]> | 2017-08-16 17:16:45 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-12-04 09:21:09 -0800 |
commit | 0c49aa0624c289164b5501a8724b6d9fdbae7f49 (patch) | |
tree | 55af9d527c5cd4820db9a415d2be7003be4adf49 /src | |
parent | 591a07632c913cadb1802196c0a50480b354d73c (diff) |
util: Add a NORETURN macro
Reviewed-by: Tapani Pälli <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/util/macros.h | 6 |
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 |