https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117610
Xi Ruoyao <xry111 at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |xry111 at gcc dot gnu.org
Resolution|--- |INVALID
--- Comment #2 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
No, it *is* initializing a pointer. You cannot initialize a struct with 0.
Instead the initializer is considered "flattened" in C.
For example:
struct s2 {
int *x;
int y;
};
int t;
int
main(void)
{
struct s2 a2[] = {0, 1, &t, 2};
_Static_assert(sizeof(a2) == sizeof(struct s2) * 2);
}