Show more error info
This commit is contained in:
parent
5f685cbbe5
commit
68c4731ae6
@ -1387,7 +1387,7 @@ CORD compile_statement(env_t *env, ast_t *ast)
|
||||
}
|
||||
default:
|
||||
if (!is_discardable(env, ast))
|
||||
code_err(ast, "The result of this statement cannot be discarded");
|
||||
code_err(ast, "The %T result of this statement cannot be discarded", get_type(env, ast));
|
||||
return CORD_asprintf("(void)%r;", compile(env, ast));
|
||||
}
|
||||
}
|
||||
|
2
tomo.c
2
tomo.c
@ -29,7 +29,7 @@ typedef enum { MODE_TRANSPILE = 0, MODE_COMPILE_OBJ = 1, MODE_COMPILE_SHARED_OBJ
|
||||
|
||||
static bool verbose = false;
|
||||
static bool show_codegen = false;
|
||||
static CORD autofmt, cconfig, cflags, ldlibs, ldflags, cc;
|
||||
static CORD autofmt = CORD_EMPTY, cconfig = CORD_EMPTY, cflags = CORD_EMPTY, ldlibs = CORD_EMPTY, ldflags = CORD_EMPTY, cc = CORD_EMPTY;
|
||||
|
||||
static int transpile_header(env_t *base_env, const char *filename, bool force_retranspile);
|
||||
static int transpile_code(env_t *base_env, const char *filename, bool force_retranspile);
|
||||
|
Loading…
Reference in New Issue
Block a user