[PATCH] D63525: LangRef: Attempt to formulate some rules for addrspacecast
David Chisnall via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 27 05:25:42 PDT 2019
theraven added inline comments.
================
Comment at: docs/LangRef.rst:2713
+space. In general pointers with the bit-value 0 are assumed to be
+dereferencable in non-0 address spaces.
+
----------------
jdoerfert wrote:
> I'd change the last sentence, maybe as shown below, but the meaning is fine.
>
> "In general, "null-pointers" have to be assumed dereferenceable in non-zero address spaces."
>
>
> dereferencable -> dereferenceable
I am also unhappy with this as a claim. null pointers should always be non-dereferenceable. The semantics of inttoptr of 0 may not yield null for a given address space and the semantics of ptrtoint of null may not yield the integer 0, but the definition of a null pointer is a guaranteed non-dereferenceable pointer.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63525/new/
https://reviews.llvm.org/D63525
More information about the llvm-commits
mailing list