This is the mail archive of the gcc-patches@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]

Re: [C PATCH] Quash spurious warnings (PR c/60784)


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


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