https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101780

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #1)
> The manual does say it doesn't warn about designated initializers, but it
> seems the anonymous union is confusing it.

The docs were fixed with r14-1657-g0f8f1dee851c23bce19977b2531cf69b4da9f88f

(In reply to Andrew Pinski from comment #5)
> Related to PR 96868.

A dup, I think. I don't think the anonymous union is relevant, C++ warns for
this too:

struct A {
  int a = 98, b;
};

int main() {
  A polo = {.a = 45};
}

*** This bug has been marked as a duplicate of bug 96868 ***

Reply via email to