From da51fea60579ed5b1ec7adbd5b0c5e4c85467953 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Wed, 10 Jul 2019 22:07:56 +0200 Subject: [PATCH] fix disappearing printf when compiling with --- compiler/fn.v | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/compiler/fn.v b/compiler/fn.v index ce45b6177c..e662d9dcd6 100644 --- a/compiler/fn.v +++ b/compiler/fn.v @@ -509,13 +509,6 @@ fn (p mut Parser) fn_call(f Fn, method_ph int, receiver_var, receiver_type strin p.error('function `$f.name` is private') } p.calling_c = f.is_c - is_print := p.pref.is_prod &&// Hide prints only in prod - !p.pref.is_test && - !p.builtin_pkg &&// Allow prints in builtin pkgs - f.is_c && f.name == 'printf' - if !p.cgen.nogen { - p.cgen.nogen = is_print - } cgen_name := p.table.cgen_name(f) // if p.pref.is_prof { // p.cur_fn.called_fns << cgen_name @@ -557,9 +550,6 @@ fn (p mut Parser) fn_call(f Fn, method_ph int, receiver_var, receiver_type strin p.fn_call_args(f) p.gen(')') p.calling_c = false - if is_print { - p.cgen.nogen = false - } // println('end of fn call typ=$f.typ') }