From 68c4731ae68b3d2a73c212c5bb342fe1a2d5e270 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 16 Sep 2024 14:27:18 -0400 Subject: Show more error info --- compile.c | 2 +- tomo.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compile.c b/compile.c index 41915f60..81627232 100644 --- a/compile.c +++ b/compile.c @@ -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)); } } diff --git a/tomo.c b/tomo.c index 40cf3de2..4b72da1e 100644 --- a/tomo.c +++ b/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); -- cgit v1.2.3