forked from aniani/nasm
nasmlib: Add generic panic() macro, and no-return nasm_panic()
Add a generic panic() macro which we can simply insert where an internal error happens. Also, create a nasm_panic() function the only purpose of which is to let the compiler know that we will never return after a panic. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
This commit is contained in:
@@ -188,4 +188,13 @@ char *strsep(char **, const char *);
|
||||
# define no_return void
|
||||
#endif
|
||||
|
||||
/*
|
||||
* How to tell the compiler that a function takes a printf-like string
|
||||
*/
|
||||
#ifdef __GNUC__
|
||||
# define printf_func(fmt, list) __attribute__((format(printf, fmt, list)))
|
||||
#else
|
||||
# define printf_func(fmt, list)
|
||||
#endif
|
||||
|
||||
#endif /* NASM_COMPILER_H */
|
||||
|
Reference in New Issue
Block a user