C++ Logo

std-proposals

Advanced search

Re: [std-proposals] A type trait to detect if value initialization can be achieved by zero-filling

From: Thiago Macieira <thiago_at_[hidden]>
Date: Mon, 30 Jan 2023 10:38:36 -0800
On Sunday, 29 January 2023 13:11:48 PST Jason McKesson via Std-Proposals
wrote:
> Also, how does Itanium-based code work if you have a member pointer in
> static storage that gets zero-initialized? Does something have to
> manually fill in the -1s at runtime, or does an object containing such
> a member pointer have to take up space in static executable storage?

The static storage then isn't zero-initialised. It's value-initialised to -1.

Ditto for MSVC ABI.

https://gcc.godbolt.org/z/ohqzsYrG8

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DCAI Cloud Engineering

Received on 2023-01-30 18:38:38