From 14745bdeb735d565b7589ba6032abd755267c850 Mon Sep 17 00:00:00 2001 From: grischka Date: Fri, 1 Aug 2014 10:59:38 +0200 Subject: tccgen: nocode_wanted: do not output constants This for example suppresses string constants such as with int main() { return sizeof "foo"; } Actually, setting nocode_wanted = 1; in libtcc.c for the initial global level seemed wrong, since obviously "nocode_wanted" means code as any side effects, also such as string constants. This reverts a part of 2de1b2d14cc920e2c698ff0086f5558c2da7f569 (documented as "Some in-between fixes" in Changelog) --- libtcc.c | 1 - 1 file changed, 1 deletion(-) (limited to 'libtcc.c') diff --git a/libtcc.c b/libtcc.c index 7caa7c1..b0ac2c7 100644 --- a/libtcc.c +++ b/libtcc.c @@ -778,7 +778,6 @@ static int tcc_compile(TCCState *s1) #endif define_start = define_stack; - nocode_wanted = 1; if (setjmp(s1->error_jmp_buf) == 0) { s1->nb_errors = 0; -- cgit v1.3.1