From 096d625445c982a2c4b169c4493c71d0e10485f4 Mon Sep 17 00:00:00 2001 From: James Turner Date: Tue, 12 Jan 2016 12:48:34 -0600 Subject: [PATCH] Allow use of noreturn attribute with Clang - other compilers could also be enabled in the future. --- simgear/compiler.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/simgear/compiler.h b/simgear/compiler.h index 2686ea1f..795747d5 100644 --- a/simgear/compiler.h +++ b/simgear/compiler.h @@ -190,6 +190,12 @@ inline int (isnan)(double r) { return !(r <= 0 || r >= 0); } # define DEPRECATED #endif +#if defined(__clang__) +# define SG_NO_RETURN [[noreturn]] +#else +# define SG_NO_RETURN +#endif + // // No user modifiable definitions beyond here. //