0
0
mirror of https://github.com/netwide-assembler/nasm.git synced 2025-09-22 10:43:39 -04:00

error: replace nasm_verror() indirection with preproc callback

Since pp_error_list_macros() was introduced, the only need for
pp_verror() is to suppress error messages in certain contexts. Replace
this function with a preprocessor callback,
preproc->pp_suppress_error(), so we can drop the nasm_verror()
function pointer entirely.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
H. Peter Anvin
2019-08-28 19:02:47 -07:00
parent 6a4353c4c2
commit a73ccfebcc
8 changed files with 46 additions and 75 deletions

View File

@@ -72,17 +72,9 @@ fatal_func printf_func(2, 3) nasm_panicf(errflags flags, const char *fmt, ...);
fatal_func nasm_panic_from_macro(const char *file, int line);
#define panic() nasm_panic_from_macro(__FILE__, __LINE__);
typedef void (*vefunc) (errflags severity, const char *fmt, va_list ap);
extern vefunc nasm_verror;
void nasm_verror(errflags severity, const char *fmt, va_list ap);
fatal_func nasm_verror_critical(errflags severity, const char *fmt, va_list ap);
static inline vefunc nasm_set_verror(vefunc ve)
{
vefunc old_verror = nasm_verror;
nasm_verror = ve;
return old_verror;
}
/*
* These are the error severity codes which get passed as the first
* argument to an efunc.