The NPO seems like plainly the best implementation of this; sometimes i even think raw pointers in Rust should have been nonnull
-
-
-
i still completely expect NonNull<T> will get syntax/coercions and become the default in the fullness of time, just need someone to champion it
- 1 more reply
New conversation -
-
-
I think you can stick addrspace(1) on all of your pointers instead
-
Yes, at least in theory, LLVM supports dereferencing NULL. There are probably some bugs where it's assumed that NULL cannot be dereferences, but it's nominally supported and essentially works already which is the same for a lot of sketchy things people already depend on in LLVM.
End of conversation
New conversation -
-
-
`match (x) { None => ..., Some(r) => ... }` is the only correct way to do this :3
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Ask Azul. They've done this for Java.
- End of conversation
New conversation -
-
-
Clang added no-delete-null-pointer-checks for Linux though, so there is now some attribute that tells it dereferencing NULL is valid.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Consider systems where address 0x0 is a perfectly valid pointer address to dereference. Do you simply ignore that case, or does the null pointer become something else (uninitialized pointer)?
-
The C standard says that dereferencing null is UB.
- 5 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.