This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/64709] New: Bogus -Wmissing-field-initializers warning
- From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 21 Jan 2015 12:30:35 +0000
- Subject: [Bug c/64709] New: Bogus -Wmissing-field-initializers warning
- Auto-submitted: auto-generated
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.