On Wed, Sep 29, 2021 at 11:22:29AM -0700, Thomas Rodgers via Gcc-patches wrote: > > The MSVC implementation uses !__has_unique_object_representations(_Tp) > > && !is_floating_point<_Tp>::value here, which is better than mine > > above (FP types don't have unique object reps, but also don't have > > padding bits).
Except the 80-bit long double, that one has padding bits (similarly _Complex long double). As I said earlier, if you want a builtin using the __builtin_clear_padding infrastructure that will return bool if __builtin_clear_padding expands to something or not, it can be easily added. GCC already uses something like that internally. Jakub