From edcd228214f131e1c33b0ea1a5747852dcb45999 Mon Sep 17 00:00:00 2001 From: herman ten brugge Date: Wed, 15 Oct 2025 10:02:09 +0200 Subject: [PATCH] Init global_expr variable This is needed when errors occur when compiling with libtcc. A next compile with libtcc results in undefined symbol. --- tccgen.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tccgen.c b/tccgen.c index e9250200..b5a385e7 100644 --- a/tccgen.c +++ b/tccgen.c @@ -409,6 +409,7 @@ ST_FUNC int tccgen_compile(TCCState *s1) anon_sym = SYM_FIRST_ANOM; nocode_wanted = DATA_ONLY_WANTED; /* no code outside of functions */ debug_modes = (s1->do_debug ? 1 : 0) | s1->test_coverage << 1; + global_expr = 0; tcc_debug_start(s1); tcc_tcov_start (s1);