Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s with zero library dependencies. Supports automatic C => V translation. https://vlang.io
==================
/tmp/v_1000/test_sfx.01J1A7PTBSAB7Z78SXWDMMJXXD.tmp.c:12735: error: 's_sfx' undeclared
...
==================
(Use `v -cg` to print the entire error message)
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
convert v from c, and the result code can't compile
Reproduction Steps
test.v
compile test.v with
-translated
Expected Behavior
compile ok
Current Behavior
will fail with :
Possible Solution
the generated c code:
seems that has something wrong with the naming rule.
Additional Information/Context
BTW, I can't see
S_sfx
in the generated C code.V version
V full version: V 0.4.6 96751ed.98a1ee2
Environment details (OS name and version, etc.)
V full version: V 0.4.6 96751ed.98a1ee2 OS: linux, Ubuntu 22.04.4 LTS Processor: 8 cpus, 64bit, little endian, Intel(R) Core(TM) i7-9700 CPU @ 3.00GHz
getwd: /home/mars/v/9 vexe: /media/HD/github/lang/v/v vexe mtime: 2024-06-25 07:37:30
vroot: OK, value: /media/HD/github/lang/v VMODULES: OK, value: /home/mars/.vmodules VTMP: OK, value: /tmp/v_1000
Git version: git version 2.34.1 Git vroot status: weekly.2024.26-5-g094c30c3 .git/config present: true
CC version: cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 thirdparty/tcc status: thirdparty-linux-amd64 40e5cbb5