[cfe-dev] constexpr bit_cast status?
Richard Smith via cfe-dev
cfe-dev at lists.llvm.org
Wed Oct 31 15:23:23 PDT 2018
On Mon, 29 Oct 2018 at 13:09, JF Bastien via cfe-dev <cfe-dev at lists.llvm.org>
wrote:
> Richard recently made __builtin_memcpy constexpr in some cases:
> https://reviews.llvm.org/rL338941
> His patch currently disallows all type-puns.
>
> Erik is looking at implementing a bit_cast intrinsic for clang,
>
Is there a reason to make it a new builtin (which I think is what you're
suggesting) rather than extending the existing __builtin_memcpy support to
cover all the bit_cast cases? (Eg, is the idea to make it exactly cover the
cases that std::bit_cast supports?) If we want both, it'd be good to at
least make the two share code.
> at which point libc++ can use it. ADT won’t be able to do so until we
> migrate to C++20 (and toolchains support it).
>
> We also want to reach out to the RedHat maintainers of libstdc++ to make
> sure we don’t adopt a weirdly different builtin.
>
>
>
> On Oct 29, 2018, at 12:56 PM, will wray via cfe-dev <
> cfe-dev at lists.llvm.org> wrote:
>
> std::bit_cast was added to the C++ 20 draft this summer:
> http://eel.is/c++draft/bit.cast
>
> In September JFB added a header with implementation (in llvm namespace):
> llvm/include/llvm/ADT/bit.h
>
> // This file implements the C++20 <bit> header.
> ...
> // - It isn't constexpr because that requires compiler support.
>
> What compiler support is it waiting on? What's the status?
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20181031/2541210d/attachment.html>
More information about the cfe-dev
mailing list