[waffle] [PATCH 24/33] core: use compiler specific (noreturn)

Emil Velikov emil.l.velikov at gmail.com
Mon Jul 7 10:28:31 PDT 2014


Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
 src/waffle/core/wcore_tinfo.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/waffle/core/wcore_tinfo.c b/src/waffle/core/wcore_tinfo.c
index 7d749b7..9a190f9 100644
--- a/src/waffle/core/wcore_tinfo.c
+++ b/src/waffle/core/wcore_tinfo.c
@@ -54,7 +54,15 @@ static __thread struct wcore_tinfo wcore_tinfo
     ;
 #endif // WAFFLE_HAS_TLS
 
-static void __attribute__((noreturn))
+#if defined(__GNUC__)
+#define NORETURN __attribute__((noreturn))
+#elif defined(_MSC_VER)
+#define NORETURN __declspec(noreturn)
+#else
+#define NORETURN
+#endif
+
+static void NORETURN
 wcore_tinfo_abort_init(void)
 {
     printf("waffle: fatal-error: failed to initialize thread local info\n");
-- 
2.0.0



More information about the waffle mailing list