From 520ec0f53a375c95c9f14d3e08e0b647aadd1ba6 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Fri, 3 Jan 2020 11:41:39 +0100 Subject: [PATCH] fix cgen_test --- vlib/compiler/cc.v | 3 ++- vlib/v/gen/tests/1.c | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/vlib/compiler/cc.v b/vlib/compiler/cc.v index 6261330352..542488980e 100644 --- a/vlib/compiler/cc.v +++ b/vlib/compiler/cc.v @@ -439,6 +439,7 @@ fn (c mut V) cc_windows_cross() { include := '-I $winroot/include ' */ mut cmd := '' + cmd = '' $if macos { cmd = 'x86_64-w64-mingw32-gcc $args -municode' } @@ -446,7 +447,7 @@ fn (c mut V) cc_windows_cross() { panic('your platform is not supported yet') } -println(cmd) + println(cmd) //cmd := 'clang -o $obj_name -w $include -m32 -c -target x86_64-win32 $v_modules_path/$c.out_name_c' if c.pref.show_c_cmd { println(cmd) diff --git a/vlib/v/gen/tests/1.c b/vlib/v/gen/tests/1.c index fbf9b38e53..44e94c7a91 100644 --- a/vlib/v/gen/tests/1.c +++ b/vlib/v/gen/tests/1.c @@ -33,6 +33,8 @@ void myuser() { User user = (User){ .age = 10, }; - User age = user.age; + int age = user.age + 1; + int boo = 2; + int boo2 = boo + 1; bool b = age > 0; }