C++ Logo

std-proposals

Advanced search

Re: [std-proposals] [Draft Proposal] Required attribute syntax

From: Jens Maurer <jens.maurer_at_[hidden]>
Date: Thu, 4 May 2023 21:47:14 +0200
On 04/05/2023 12.22, Lauri Vasama via Std-Proposals wrote:
> The fact is that there are programs which behaviours depend on whether the implementation chooses to ignore this particular attribute or not.

Such programs are broken (note ABI issues are out-of-scope for the C++ standard).

> Perhaps that is fine, but perhaps not. As noted in the draft proposal, Microsoft has also been unwilling to implement [[no_unique_address]] in its ignorable form because it would cause an insidious ABI incompatibility depending on the language standard in use.

That's not entirely accurate, it seems.

https://devblogs.microsoft.com/cppblog/msvc-cpp20-and-the-std-cpp20-switch/

says Microsoft is indeed worried about the ABI incompatibilites caused by
starting to observe [[no_unique_address]], and

"It was decided to hold-off on enabling the optimization for the [[no_unique_address]]
attribute in the MSVC compiler until our next ABI breaking revision of the MSVC toolset,
where it will be enabled across all language modes."

That reads different than "unwilling to implement" to me.

Jens

Received on 2023-05-04 19:47:22