https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101780
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to KL from comment #0) > Can you confirm it is the intended behavior? See the documentation for -Wmissing-field-initializers. It doesn't warn about members being uninitialized, it warns about them not being explicitly initialized, which is the case here. The manual does say it doesn't warn about designated initializers, but it seems the anonymous union is confusing it. > If so, could we make the message clearer, adding: "the following designated > fields X,Y,Z will be default initialized. P,Q,R are left uninitialized." How would P,Q,R be left uninitialized? > That way, it is much more useful as a warning, instead of making the dev > fear of undefined behavior, when there is not. It doesn't say anything about undefined behaviour.