[Bug c++/112666] Missed optimization: Value initialization zero-initializes members with user-defined constructor

2023-11-23 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112666 Sam James changed: What|Removed |Added Resolution|FIXED |INVALID

[Bug c++/112666] Missed optimization: Value initialization zero-initializes members with user-defined constructor

2023-11-23 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112666 --- Comment #5 from Jonathan Wakely --- (In reply to Francisco Paisana from comment #4) > One last thing, I might have misread this as well. > > > "Zero-initialization is performed in the following situations: > > ... > > 2) As part of

[Bug c++/112666] Missed optimization: Value initialization zero-initializes members with user-defined constructor

2023-11-23 Thread paisanafc at gmail dot com via Gcc-bugs
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 >

[Bug c++/112666] Missed optimization: Value initialization zero-initializes members with user-defined constructor

2023-11-23 Thread paisanafc at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112666 Francisco Paisana changed: What|Removed |Added Resolution|--- |FIXED

[Bug c++/112666] Missed optimization: Value initialization zero-initializes members with user-defined constructor

2023-11-23 Thread paisanafc at gmail dot com via Gcc-bugs
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

[Bug c++/112666] Missed optimization: Value initialization zero-initializes members with user-defined constructor

2023-11-22 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112666 --- Comment #1 from Jonathan Wakely --- (In reply to Francisco Paisana from comment #0) > The struct "C" which is just "B" and an int is much slower at being > initialized than B when value initialization (via {}) is used. However, my >