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

            Bug ID: 71250
           Summary: -Wmissing-field-initializers documentation is
                    incomplete
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vincent-gcc at vinc17 dot net
  Target Milestone: ---

When doing some tests on structure initialization and trying to reproduce a
warning, I was wondering why on

  struct { int a, b; } x = { 0 };

a warning was not emitted with -Wmissing-field-initializers, and the gcc-6 man
page did not help:

  -Wmissing-field-initializers
      Warn if a structure's initializer has some fields missing.  For
      example, the following code causes such a warning, because "x.h" is
      implicitly zero:

              struct s { int f, g, h; };
              struct s x = { 3, 4 };

I eventually found bug 36750. So, the GCC documentation should be updated.

Reply via email to