zig does not error/silently ignores const refs passed to varargs #19862
Labels
proposal
This issue suggests modifications. If it also has the "accepted" label then it is planned.
Milestone
Zig Version
0.13.0-dev.46+3648d7df1
Steps to Reproduce and Observed Behavior
reproed on linux aarch64
with these files
run
zig run main.zig lib.a
Received output:
Additional information:
If I change
const i: c_int = 5
tovar i: c_int = 5
it will seti
to 12345.Expected Behavior
I expect a compilation error like
expected type '*c_int', found '*const c_int'
or something similar. Or if this compiled successfully I would expect it to seti
to 12345. Either way, I think the current behavior is a bugThe text was updated successfully, but these errors were encountered: