Comment by delian66

3 years ago

Yes, it is a null pointer, produced by the initialization to 0, as you noticed.

That is the current state - V wants to prevent setting pointers to arbitrary values, including 0, outside of unsafe code, but not all cases are checked yet, and you can get one. For example, you can also still cast numbers to pointers without unsafe{}:

    x := voidptr(0)
    println(x)

... and that will compile without an error, and produce `0x0`.

You can also search the issues, and find other examples of code, that ultimately produced null pointers.