summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-07-01 22:01:07 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-07-01 22:01:07 -0700
commit396e6dcc4b446f2b17cc5a03b8e43b1a298b9895 (patch)
tree1d3513d76ddce19062fa59b0956e9c060b00abee
parent8beadd4da840c8537e6273ab05d1638eddb75e5c (diff)
downloadnasm-396e6dcc4b446f2b17cc5a03b8e43b1a298b9895.tar.gz
compiler.h: new macro for a non-returning function
Add a new macro for a non-returning function. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--compiler.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler.h b/compiler.h
index a3a5039d..312b027a 100644
--- a/compiler.h
+++ b/compiler.h
@@ -170,4 +170,13 @@ char *strsep(char **, const char *);
# define unlikely(x) (!!(x))
#endif
+/*
+ * How to tell the compiler that a function doesn't return
+ */
+#ifdef __GNUC__
+# define noreturn void __attribute__((noreturn))
+#else
+# define noreturn void
+#endif
+
#endif /* NASM_COMPILER_H */