diff --git a/Makefile b/Makefile index 6341205544..71ee253e22 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ all: clean v $(info V has been successfully built) v: v.c - cc -march=native -std=gnu11 -w -o v v.c + cc -std=gnu11 -w -o v v.c ./v -o v compiler rm v.c diff --git a/compiler/jsgen.v b/compiler/jsgen.v index 9f2a8f98af..5b62c098ce 100644 --- a/compiler/jsgen.v +++ b/compiler/jsgen.v @@ -105,7 +105,7 @@ string res = tos2(""); } // cJSON_delete //p.cgen.fns << '$dec return opt_ok(res); \n}' - p.cgen.fns << '$dec return opt_ok(res, sizeof(res)); \n}' + p.cgen.fns << '$dec return opt_ok(res, sizeof(*res)); \n}' p.cgen.fns << '/*enc start*/ $enc return o;}' } diff --git a/vlib/builtin/struct_test.v b/compiler/tests/struct_test.v similarity index 100% rename from vlib/builtin/struct_test.v rename to compiler/tests/struct_test.v