This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C PATCH] Quash spurious warnings (PR c/60784)
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Marek Polacek <polacek at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 1 May 2014 21:40:34 +0000
- Subject: Re: [C PATCH] Quash spurious warnings (PR c/60784)
- Authentication-results: sourceware.org; auth=none
- References: <20140413150313 dot GA1200 at redhat dot com>
On Sun, 13 Apr 2014, Marek Polacek wrote:
> This PR is about spurious warnings with -Wmissing-field-initializers
> that can be seen when using multi-level designated initializers.
> The warning should not be output for designated initializers [*],
> pop_init_level checks for constructor_designated. But push_init_level
> clears this variable, so we need to set it back if needed. In other
> words, if we have ".a.i", then both "a" and "i" should be marked as
> designated. For "a" we set constructor_designated correctly, but then
> when processing "i" we push "a" and thus for "i" it's not set properly.
>
> [*] At least right now. There's a PR about -Wmissing-field-initializers=2
> that should warn even for designated initializers.
>
> Regtested/bootstrapped on x86_64-linux, ok for trunk?
OK.
--
Joseph S. Myers
joseph@codesourcery.com