This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/71250] New: -Wmissing-field-initializers documentation is incomplete
- From: "vincent-gcc at vinc17 dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 23 May 2016 23:29:38 +0000
- Subject: [Bug other/71250] New: -Wmissing-field-initializers documentation is incomplete
- Auto-submitted: auto-generated
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.