[PATCH] D150875: Make dereferencing a void* a hard-error instead of warn-as-error
Erich Keane via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 18 10:20:11 PDT 2023
erichkeane added a comment.
In D150875#4353467 <https://reviews.llvm.org/D150875#4353467>, @jrtc27 wrote:
> We heavily rely on this extension in CheriBSD via `__typeof__((*(p))) * __capability` as we want to be able to take any pointer, including to an array or function that needs to undergo decay to be an actual pointer, and turn it into a `__capability`-qualified one. Presumably you're saying we should instead use `__typeof__((0, (p))) __capability` as an uglier alternative way to force decay?
Do you do that in C++, or just C? Note that this does NOT change the behavior in C. In C++ I'd probably just suggest using `std::decay`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150875/new/
https://reviews.llvm.org/D150875
More information about the cfe-commits
mailing list