This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: C++17 std::launder and aliasing
- From: Ville Voutilainen <ville dot voutilainen at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Jonathan Wakely <jwakely at redhat dot com>, Richard Biener <richard dot guenther at gmail dot com>, Richard Biener <rguenther at suse dot de>, Jason Merrill <jason at redhat dot com>, "libstdc++" <libstdc++ at gcc dot gnu dot org>
- Date: Fri, 21 Oct 2016 19:50:11 +0300
- Subject: Re: C++17 std::launder and aliasing
- Authentication-results: sourceware.org; auth=none
- References: <20161018110632.GJ7282@tucnak.redhat.com> <CAFiYyc1Fg5dawVNBUsjsq4jkoWtEHqB8ogb7O5Rmft+EcT6OMQ@mail.gmail.com> <20161021162925.GW2922@redhat.com> <20161021164304.GO7282@tucnak.redhat.com>
On 21 October 2016 at 19:43, Jakub Jelinek <jakub@redhat.com> wrote:
> On Fri, Oct 21, 2016 at 05:29:25PM +0100, Jonathan Wakely wrote:
>> >As said, nothing needed for the middle-end.
>>
>> Thanks, Richi.
>>
>> Moving from gcc@ to libstdc++@ as this is now libstdc++-specific.
>>
>> So we can define std::launder as a no-op for GCC. LLVM apparently does
>> have some optimizations that need to be disabled by doing the laundry,
>> and Clang will be adding a T* __builtin_launder(T*) for that.
>
> Or we could add a typegeneric __builtin_launder builtin that would
> immediately fold to its argument. Then we can change it any time we figure
> out we need to do something there.
Sounds good to me.