This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/64709] New: Bogus -Wmissing-field-initializers warning


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

            Bug ID: 64709
           Summary: Bogus -Wmissing-field-initializers warning
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mpolacek at gcc dot gnu.org

$ ./cc1 -quiet q.c -Wmissing-field-initializers
q.c: In function âfooâ:
q.c:5:10: warning: missing initializer for field âbâ of âstruct Sâ
[-Wmissing-field-initializers]
   struct S s[] = { { 1, 2 }, { 0 } };
          ^
q.c:1:19: note: âbâ declared here
 struct S { int a, b; };
                   ^
$ cat q.c
struct S { int a, b; };
void
foo (void)
{
  struct S s[] = { { 1, 2 }, { 0 } };
}

Started with r211289.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]