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>
This commit is contained in:
H. Peter Anvin 2009-07-01 22:01:07 -07:00
parent 8beadd4da8
commit 396e6dcc4b

View File

@ -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 */