Bug 1110870
Summary: | -Wextra produces 'missing initializer' warnings when {0} struct initializer used for object containing aggregate members | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Jason Vas Dias <jason.vas.dias> |
Component: | gcc | Assignee: | Jakub Jelinek <jakub> |
Status: | CLOSED NOTABUG | QA Contact: | qe-baseos-tools-bugs |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.4 | CC: | mpolacek |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2014-06-18 16:25:49 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Jason Vas Dias
2014-06-18 16:12:46 UTC
oops, forget about 'aggregate members' in description above - it actually occurs for any struct containing more than one member. This was changed with http://gcc.gnu.org/PR36750, but I'd say it is highly undesirable to change the warnings in an existing gcc release. -Wextra certainly includes various warnings that go beyond what the standard mandates, the exception made for PR36750 was for C only and only for { 0 } initializers, e.g. if you write { 0, 0 }; even latest GCC will still complain about missing initializers. It is true they are initialized with zero, on the other side not always is that the intended thing, often just some initializers were forgotten (say, you have a structure, write initializer for it when it has 2 fields, then add another field and forget to add initializer for that). See -Wmissing-field-initializers documentation. |