We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile: v -keepc -prod -show-c-output test1.v
module main // file:test1.v import os fn main() { mut i_full_path := os.join_path('/home/user1', 'test.conf') println(i_full_path) }
Produced output with warning:
tmp/v_1000/pa_tech.tmp.c: In function ‘os__join_path_single.isra’: /tmp/v_1000/pa_tech.tmp.c:13214:10: warning: ‘memcpy’ specified bound between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=] 13214 | return memcpy(dest, const_src, n); | ^ /tmp/v_1000/test1.tmp.c: In function ‘print_backtrace_skipping_top_frames_linux.isra’: /tmp/v_1000/test1.tmp.c:8549:10: warning: ‘memcpy’ specified bound between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=] 8549 | return memcpy(dest, const_src, n); | ^ =================================
No warning.
Produce warning.
Compile source from description.
No response
V 0.3.5 015ccc2
Distributor ID: Debian Description: Debian GNU/Linux 11 (bullseye) Release: 11 Codename: bullseye Linux 5.10.0-23-amd64 #1 SMP Debian 5.10.179-1 (2023-05-12) x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered:
Which C compiler do you have? And what version is it?
On Manjaro Linux it works fine with 3 different compilers:
tcc (that comes with V) gcc (GCC) 13.1.1 20230429 clang version 15.0.7
All 3 work and show the same (expected) output:
$ v run foo.v /home/user1/test.conf $ v -cc gcc run foo.v /home/user1/test.conf $ v -cc clang run foo.v /home/user1/test.conf $
Sorry, something went wrong.
tcc.exe | tcc version 0.9.27 (x86_64 Linux)
v -keepc -g -showcc -show-c-output test1.v > C compiler cmd: '/home/bruno/bin/v/thirdparty/tcc/tcc.exe' '@/tmp/v_1000/test1.tmp.c.rsp' > C compiler response file "/tmp/v_1000/test1.tmp.c.rsp": -std=gnu99 -D_DEFAULT_SOURCE -g -o "/home/bruno/W7/Programowanie/v/postgres/test1" -D GC_BUILTIN_ATOMIC=1 -D GC_THREADS=1 -I "/home/bruno/bin/v/thirdparty/libgc/include" "/tmp/v_1000/test1.tmp.c" -bt25 -rdynamic "/home/bruno/bin/v/thirdparty/tcc/lib/libgc.a" -ldl -lpthread ======== C Compiler output ========
But with gcc:
v -cc gcc -keepc -prod -show-c-output test1.v ======== C Compiler output ======== /tmp/v_1000/test1.tmp.c: In function ‘print_backtrace_skipping_top_frames_linux.isra’: /tmp/v_1000/test1.tmp.c:8549:10: warning: ‘memcpy’ specified bound between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=] 8549 | return memcpy(dest, const_src, n); | ^
gcc (Debian 10.2.1-6) 10.2.1 20210110
No branches or pull requests
Describe the bug
Compile: v -keepc -prod -show-c-output test1.v
Produced output with warning:
Expected Behavior
No warning.
Current Behavior
Produce warning.
Reproduction Steps
Compile source from description.
Possible Solution
No response
Additional Information/Context
No response
V version
V 0.3.5 015ccc2
Environment details (OS name and version, etc.)
The text was updated successfully, but these errors were encountered: