C++ Logo

std-proposals

Advanced search

Re: [std-proposals] D3666R0 Bit-precise integers

From: Thiago Macieira <thiago_at_[hidden]>
Date: Sat, 06 Sep 2025 08:19:10 -0700
On Friday, 5 September 2025 21:03:51 Pacific Daylight Time Paul Caprioli wrote:
> But given the compiler-dependent alignment differences, it seems one cannot
> portably use this type in a structure because different compilers on the
> same platform will pad differently. I don't want to do this anyway, but
> where is it written I can't?

There aren't alignment differences: they all have the same alignment. Look at
the Godbolt link I posted.
 
> If I understand correctly, these types are not part of the platform ABI.
> That's the answer, right?

They are. See the x86-64 psABI https://gitlab.com/x86-psABIs/x86-64-ABI, figure
3.1.
 
> So, what's the plan for _BitInt?

See the next page (18) of the psABI above.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Principal Engineer - Intel Platform & System Engineering

Received on 2025-09-06 15:19:13