Re: [PATCH] c++: v2: Add __builtin_bit_cast to implement std::bit_cast [PR93121]

2020-11-25 Thread Jason Merrill via Gcc-patches
On 11/25/20 1:50 PM, Jakub Jelinek wrote: On Wed, Nov 25, 2020 at 12:26:17PM -0500, Jason Merrill wrote: + if (DECL_BIT_FIELD (fld) + && DECL_NAME (fld) == NULL_TREE) + continue; I think you want to check DECL_PADDING_P here; th

Re: [PATCH] c++: v2: Add __builtin_bit_cast to implement std::bit_cast [PR93121]

2020-11-25 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 25, 2020 at 12:26:17PM -0500, Jason Merrill wrote: > > + if (DECL_BIT_FIELD (fld) > > + && DECL_NAME (fld) == NULL_TREE) > > + continue; > > I think you want to check DECL_PADDING_P here; the C and C++ front ends set > it on unnamed

Re: [PATCH] c++: v2: Add __builtin_bit_cast to implement std::bit_cast [PR93121]

2020-11-25 Thread Jason Merrill via Gcc-patches
On 11/2/20 2:21 PM, Jakub Jelinek wrote: On Thu, Jul 30, 2020 at 10:16:46AM -0400, Jason Merrill via Gcc-patches wrote: The following patch adds __builtin_bit_cast builtin, similarly to clang or MSVC which implement std::bit_cast using such an builtin too. Great! Sorry for the long delay. T

Re: [PATCH] c++: v2: Add __builtin_bit_cast to implement std::bit_cast [PR93121]

2020-11-25 Thread Jonathan Wakely via Gcc-patches
On 25/11/20 17:24 +0100, Jakub Jelinek wrote: On Wed, Nov 25, 2020 at 10:31:28AM +, Jonathan Wakely via Gcc-patches wrote: On 25/11/20 10:23 +0100, Jakub Jelinek wrote: > On Tue, Nov 24, 2020 at 05:31:03PM -0700, Jeff Law wrote: > > FIrst, do we need to document the new builtin?  > > I th

Re: [PATCH] c++: v2: Add __builtin_bit_cast to implement std::bit_cast [PR93121]

2020-11-25 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 25, 2020 at 10:31:28AM +, Jonathan Wakely via Gcc-patches wrote: > On 25/11/20 10:23 +0100, Jakub Jelinek wrote: > > On Tue, Nov 24, 2020 at 05:31:03PM -0700, Jeff Law wrote: > > > FIrst, do we need to document the new builtin?  > > > > I think for builtins that are only meant f

Re: [PATCH] c++: v2: Add __builtin_bit_cast to implement std::bit_cast [PR93121]

2020-11-25 Thread Jonathan Wakely via Gcc-patches
On 25/11/20 10:23 +0100, Jakub Jelinek wrote: On Tue, Nov 24, 2020 at 05:31:03PM -0700, Jeff Law wrote: FIrst, do we need to document the new builtin?  I think for builtins that are only meant for libstdc++ as underlying implementation of its documented in the standard APIs we have some case

Re: [PATCH] c++: v2: Add __builtin_bit_cast to implement std::bit_cast [PR93121]

2020-11-25 Thread Jakub Jelinek via Gcc-patches
On Tue, Nov 24, 2020 at 05:31:03PM -0700, Jeff Law wrote: > FIrst, do we need to document the new builtin?  I think for builtins that are only meant for libstdc++ as underlying implementation of its documented in the standard APIs we have some cases where we don't document them and other cases w

Re: [PATCH] c++: v2: Add __builtin_bit_cast to implement std::bit_cast [PR93121]

2020-11-24 Thread Jeff Law via Gcc-patches
On 11/2/20 12:21 PM, Jakub Jelinek via Gcc-patches wrote: > On Thu, Jul 30, 2020 at 10:16:46AM -0400, Jason Merrill via Gcc-patches wrote: >>> The following patch adds __builtin_bit_cast builtin, similarly to >>> clang or MSVC which implement std::bit_cast using such an builtin too. >> Great! >

[PATCH] c++: v2: Add __builtin_bit_cast to implement std::bit_cast [PR93121]

2020-11-02 Thread Jakub Jelinek via Gcc-patches
On Thu, Jul 30, 2020 at 10:16:46AM -0400, Jason Merrill via Gcc-patches wrote: > > The following patch adds __builtin_bit_cast builtin, similarly to > > clang or MSVC which implement std::bit_cast using such an builtin too. > > Great! Sorry for the long delay. The following patch implements what