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
linux, Linux version 6.17.9-arch1-1 (linux@archlinux) (gcc (GCC) 15.2.1 20251112, GNU ld (GNU Binutils) 2.45.1) #1 SMP PREEMPT_DYNAMIC Mon, 24 Nov 2025 15:21:09 +0000
Processor
16 cpus, 64bit, little endian, 12th Gen Intel(R) Core(TM) i5-1240P
Memory
5GB/15.34GB
V executable
/home/ge/.vlang/v
V last modified time
2025-12-17 15:29:14
V home dir
OK, value: /home/ge/.vlang
VMODULES
OK, value: /home/ge/.vmodules
VTMP
OK, value: /tmp/v_1000
Current working dir
OK, value: /tmp
Git version
git version 2.52.0
V git status
weekly.2025.50-65-g3cf0c929
.git/config present
true
cc version
cc (GCC) 15.2.1 20251112
gcc version
gcc (GCC) 15.2.1 20251112
clang version
clang version 21.1.6
tcc version
tcc version 0.9.28rc 2025-02-13 HEAD@f8bd136d (x86_64 Linux)
tcc git status
thirdparty-linux-amd64 696c1d84
emcc version
N/A
glibc version
ldd (GNU libc) 2.42
What did you do? ./v -g -o vdbg cmd/v && ./vdbg or_block_c_error.v && or_block_c_error
fnfoo(a int) !int {
if a <0 {
returnerror('foo')
}
return a
}
fnbar(a int) !int {
returnfoo(a) or {
if a <0 {
-1
} else {
returnerror('bar')
}
}
}
fnmain() {
assertbar(0)!==0
}
What did you see?
================== C compilation error (from tcc): ==============
cc: /tmp/v_1000/or_block_c_error.01KCPEWAJFMZRHA0T0TE3VTY2F.tmp.c:4928: error: cannot convert 'struct _result_int' to 'int'
=================================================================
Try passing `-g` when compiling, to see a .v file:line information, that correlates more with the C error.
(Alternatively, pass `-show-c-output`, to print the full C 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 .
What did you expect to see?
Maybe a V checker error? IDK. Definitely not a C error.
Additional info
return -1 instead of just -1 resolves the issue.
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.
V version: V 0.4.12 3cf0c92, press to see full `v doctor` output
What did you do?
./v -g -o vdbg cmd/v && ./vdbg or_block_c_error.v && or_block_c_errorWhat did you see?
What did you expect to see?
Maybe a V checker error? IDK. Definitely not a C error.
Additional info
return -1instead of just-1resolves the issue.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.