[PATCH] D62825: [C++2a] Add __builtin_bit_cast, used to implement std::bit_cast

JF Bastien via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 13 12:15:33 PDT 2019


jfb added a comment.

In D62825#1542377 <https://reviews.llvm.org/D62825#1542377>, @rsmith wrote:

> (You might argue that it's ridiculous to require that `nullptr_t` have the same size and alignment as `void*` but not have the same storage representation as a null `void*`. I'd agree, and I've raised this in committee before, but without success)


We could open a DR for `bit_cast<void*>(nullptr_t{})`, with proposed resolution that the `void*` returned is a null `void*`. Approaching the same problem from a different angle to confuse the prey.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62825/new/

https://reviews.llvm.org/D62825





More information about the llvm-commits mailing list