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

2020-12-03 Thread Jason Merrill via Gcc-patches
On 11/26/20 10:09 AM, Jakub Jelinek wrote: Sorry, thought I had replied to this before. The following patch removes the mask from the new native_interpret_aggregate moved to fold-const.c altogether. Instead, the code uses the __builtin_clear_padding infrastructure (new entrypoint in there). If

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

2020-11-26 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 25, 2020 at 07:52:44PM -0500, Jason Merrill wrote: > > > I think you want to check DECL_PADDING_P here; the C and C++ front ends > > > set > > > it on unnamed bit-fields, and that's what is_empty_type looks at. > > > > Ok, changed in my copy. I'll also post a patch for > > __builtin_