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
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112666
Arvid Jonasson changed:
What|Removed |Added
CC||jonassonarvid02 at gmail dot
com
---
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
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
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