You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
git clone https://github.com/mike-ward/lsv.git
cd lsv
v -prod -autofree lsv -o bin/lsv
Expected Behavior
Successful build.
Current Behavior
╰─ ▶ v -prod -autofree lsv -o bin/lsv
================== C compilation error (from cc): ==============
cc: /tmp/v_501/lsv.01JHZT617Q1HEWNACNB4SWYPF9.tmp.c:4554:53: error: passing 'string' (aka 'struct string') to parameter of incompatible type 'string *' (aka 'struct string *'); take the address with &
cc: 4554 | int result = main__string_compare(/*autofree arg*/_arg_expr_main_string_compare_1_1383, /*autofree arg*/_arg_expr_main_string_compare_2_1383, _V_closure_ctx->options.sort_ignore_case);
cc: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc: | &
cc: /tmp/v_501/lsv.01JHZT617Q1HEWNACNB4SWYPF9.tmp.c:3520:50: note: passing argument to parameter 'a' here
cc: 3520 | VV_LOCAL_SYMBOL int main__string_compare(string* a, string* b, bool ignore_case);
cc: | ^
cc: /tmp/v_501/lsv.01JHZT617Q1HEWNACNB4SWYPF9.tmp.c:15947:47: error: use of undeclared identifier '_arg_expr_main_real_length_1_3749'
cc: 15947 | int _t2 = main__real_length(/*autofree arg*/_arg_expr_main_real_length_1_3749);
cc: | ^
cc: /tmp/v_501/lsv.01JHZT617Q1HEWNACNB4SWYPF9.tmp.c:16490:47: error: expected expression
cc: 16490 | string _arg_expr_main_right_pad_end_1_10067 = }
... (the original output was 86 lines long, and was truncated to 12 lines)
================================================================
(You can pass `-cg`, or `-show-c-output` as well, to print all the C error messages).
builder error:
==================
C error found. It should never happen, when compiling pure V code.
This is a V compiler bug, please report it using `v bug file.v`,
or goto https://github.com/vlang/v/issues/new/choose .
You can also use #help on Discord: https://discord.gg/vlang .
Describe the bug
Receiving a C error when trying to compile https://github.com/mike-ward/lsv with
-autofree
Reproduction Steps
Expected Behavior
Successful build.
Current Behavior
Possible Solution
No response
Additional Information/Context
No response
V version
V 0.4.9 11c59cf
Environment details (OS name and version, etc.)
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered: