https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112666
--- Comment #4 from Francisco Paisana ---
One last thing, I might have misread this as well.
> "Zero-initialization is performed in the following situations:
> ...
> 2) As part of value-initialization sequence [...] for members of
> value-init
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112666
Francisco Paisana changed:
What|Removed |Added
Resolution|--- |FIXED
Status|UNCONFIRME
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112666
--- Comment #2 from Francisco Paisana ---
Jonathan Wakely, thanks a lot for your clarification. I finally got it.
In summary, we established that:
1. if a type T (in my case C) has no user-defined ctor, it will be
zero-initialized.
2. and for
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112666
Bug ID: 112666
Summary: Missed optimization: Value initialization
zero-initializes members with user-defined constructor
Product: gcc
Version: 11.4.0
Status: UNCONFIRMED