diff --git a/vlib/v/gen/cgen.v b/vlib/v/gen/cgen.v index c778946277..d8cdd8315b 100644 --- a/vlib/v/gen/cgen.v +++ b/vlib/v/gen/cgen.v @@ -13,6 +13,7 @@ import v.util import v.depgraph import term +// NB: keywords after 'new' are reserved in C++ const ( c_reserved = ['delete', 'exit', 'unix', 'error', 'calloc', 'malloc', 'free', 'panic', 'auto', 'char', @@ -37,7 +38,6 @@ const ( 'void', 'volatile', 'while', - // C++ keywords 'new', 'namespace', 'class', @@ -2500,7 +2500,22 @@ fn (mut g Gen) write_init_function() { g.writeln('array_free(&_const_os__args);') g.writeln('string_free(&_const_os__wd_at_startup);') } + // + g.writeln('array_free(&_const_math__bits__de_bruijn32tab);') + g.writeln('array_free(&_const_math__bits__de_bruijn64tab);') + g.writeln('array_free(&_const_math__bits__ntz_8_tab);') + g.writeln('array_free(&_const_math__bits__pop_8_tab);') + g.writeln('array_free(&_const_math__bits__rev_8_tab);') + g.writeln('array_free(&_const_math__bits__len_8_tab);') + g.writeln('array_free(&_const_strconv__ftoa__ten_pow_table_32);') + g.writeln('array_free(&_const_strconv__ftoa__ten_pow_table_64);') g.writeln('array_free(&_const_strconv__ftoa__powers_of_10);') + g.writeln('array_free(&_const_strconv__ftoa__pow5_split_32);') + g.writeln('array_free(&_const_strconv__ftoa__pow5_inv_split_32);') + g.writeln('array_free(&_const_strconv__ftoa__pow5_split_64);') + g.writeln('array_free(&_const_strconv__ftoa__pow5_inv_split_64);') + g.writeln('array_free(&_const_strconv__dec_round);') + // g.writeln('}') if g.pref.printfn_list.len > 0 && '_vcleanup' in g.pref.printfn_list { println(g.out.after(fn_vcleanup_start_pos)) @@ -3833,7 +3848,7 @@ fn (mut g Gen) gen_str_for_varg(styp, str_fn_name string, has_str_method bool) { g.auto_str_funcs.writeln('\tfor(int i=0; i