https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93916

--- Comment #5 from rguenther at suse dot de <rguenther at suse dot de> ---
On Tue, 25 Feb 2020, andysem at mail dot ru wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93916
> 
> --- Comment #4 from andysem at mail dot ru ---
> Are you saying that implementation is allowed to not preserve unused storage
> state upon construction and assignment? Because I don't think this is what the
> standard says.

I think the standard says that upon construction of an object the
previous memory state becomes indeterminate.

> Is there any other way to achieve the effect of initializing padding in a
> struct?

The only way I see would be to do that inside the constructor but I
realize that's not something you control?

I think the standard also gives you no way to access the padding
or guarantees anything about the paddings value which essentially
means you're relying on implementation behavior.

Reply via email to