Skip to content

Commit 05d9292

Browse files
rwatsonbrooksdavis
andauthored
Add note on ptraddr_t and it ongoing standardisation.
Co-authored-by: Brooks Davis <brooks@one-eyed-alien.net>
1 parent 5007574 commit 05d9292

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/limitations/compile-time-type-uncertainty.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ long` will lead to the pointer no longer being dereferenceable.
105105
essential to achieving the programming goals of either holding a pointer or
106106
integer in the same type (perhaps as an opaque argument), or to enable more
107107
rich forms of arithmetic on pointers.
108+
Where programers wish to compute on the address of pointers without provenance, `ptraddr_t` should be used to make this clear.
109+
Pointers can be unambiguously reconstructed using `ptraddr_t` computations and `cheri_address_set()`.
110+
`ptraddr_t` is currently under consideration for standardization as paper [P3744R0](https://isocpp.org/files/papers/P3744R0.html).
108111
`long` and `unsigned long` should never be used to hold pointers that must
109112
remain deferenceable.
110113

0 commit comments

Comments
 (0)