]> git.mxchange.org Git - simgear.git/commitdiff
Allow use of noreturn attribute with Clang
authorJames Turner <zakalawe@mac.com>
Tue, 12 Jan 2016 18:48:34 +0000 (12:48 -0600)
committerJames Turner <zakalawe@mac.com>
Tue, 12 Jan 2016 18:48:34 +0000 (12:48 -0600)
- other compilers could also be enabled in the future.

simgear/compiler.h

index 2686ea1ff0f3c0507ee107963c7a51a09f912341..795747d533e252c4837bae01bfc132147129afeb 100644 (file)
@@ -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.
 //