From f67922782ec6d30b0bec95d101be64f22775c099 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Fri, 30 Jul 2021 17:56:46 +0300 Subject: [PATCH] ci: fix tools using `import math`, for `const x = i64(-9223372036854775807-1)` fails --- vlib/v/gen/c/cgen.v | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vlib/v/gen/c/cgen.v b/vlib/v/gen/c/cgen.v index 39ac7e667b..52b29a54da 100644 --- a/vlib/v/gen/c/cgen.v +++ b/vlib/v/gen/c/cgen.v @@ -5028,6 +5028,9 @@ fn (mut g Gen) const_decl_precomputed(mod string, name string, ct_value ast.Comp g.const_decl_write_precomputed(styp, cname, ct_value.str()) } i64 { + if typ == ast.i64_type { + return false + } if typ == ast.int_type { // TODO: use g.const_decl_write_precomputed here too. // For now, use #define macros, so existing code compiles