C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Fixing std::bit_cast padding bit issues

From: Thiago Macieira <thiago_at_[hidden]>
Date: Thu, 22 Jan 2026 08:53:31 -0800
On Thursday, 22 January 2026 08:35:58 Pacific Standard Time Arthur O'Dwyer via
Std-Proposals wrote:
> There are no ABI issues and no backward-compatibility issues. It would not
> totally surprise me if vendors are actually already doing this today,
> because doing anything else (at constexpr time, anyway) would be harder.

They aren't. https://gcc.godbolt.org/z/EjGb89sez (ignore the MSVC and ICC
panes)

They use the x87 to store the long double to memory, which means 6 of the 16
bytes are unmodified from what was there.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Principal Engineer - Intel Data Center - Platform & Sys. Eng.

Received on 2026-01-22 16:53:34