[Bug c++/116469] New: Inconsistent Zero Initialization of Nested Structures

2024-08-23 Thread jonassonarvid02 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116469 Bug ID: 116469 Summary: Inconsistent Zero Initialization of Nested Structures Product: gcc Version: 14.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Com

[Bug c++/116469] Inconsistent Zero Initialization of Nested Structures

2024-08-23 Thread jonassonarvid02 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116469 --- Comment #1 from Arvid Jonasson --- Created attachment 58981 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58981&action=edit Example 2 preprocessed

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

2024-08-23 Thread jonassonarvid02 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112666 Arvid Jonasson changed: What|Removed |Added CC||jonassonarvid02 at gmail dot com ---

[Bug c++/116469] Inconsistent Zero Initialization of Nested Structures

2024-08-23 Thread jonassonarvid02 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116469 --- Comment #2 from Arvid Jonasson --- Quick update: I initially overlooked that the classes were aggregate types, which don't require zero-initialization. However, the issue persists with non-aggregate types. To demonstrate this, I've modified

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

2024-08-23 Thread jonassonarvid02 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112666 --- Comment #7 from Arvid Jonasson --- (In reply to Jonathan Wakely from comment #1) > > C does not have a user-provided default constructor, so value-initialization > means: > > "- the object is zero-initialized and the semantic constraints f

[Bug c++/116469] Inconsistent Zero Initialization of Nested Structures

2024-08-23 Thread jonassonarvid02 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116469 --- Comment #3 from Arvid Jonasson --- Modified Example 2 with non-aggregate types: -- #include #include #include template struct Inner { Inner() {} unsigne