https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120860
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
What I am thinking about is do we want a full attribute which allows some
fields to be optional or the attribute for the whole struct. I think the
attribute for the whole struct is not wanted for the case listed here.
Having it for the whole struct means some required fields will be initialized
to 0/null like what Wmissing-field-initializers warning is trying to prevent.
Also does the attribute apply recursively or just for the fields of the struct.
That is:
```
struct a
{
int f1, f2;
};
struct b newattribute_disable_warning
{
struct a f1;
struct a f2;
};
struct b var = { {1} };
```
Attribute on the fields marking them as optional seems like a better option