[PATCH] D62825: [C++2a] Add __builtin_bit_cast, used to implement std::bit_cast
John McCall via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 13 11:15:12 PDT 2019
rjmccall added a comment.
In what sense is the bit-pattern of a null pointer indeterminate? It's implementation-specified, but the compiler is certainly required to be able to produce that value during the constant initialization phase. If the language committee wants to make this non-constant out of some sort of portability concern, that's its business, but it's certainly implementable even if the target has non-zero null pointers or even different null pointer patterns for different types (though of course `nullptr_t` uses `void*`'s pattern).
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