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] Don't warn on = { } initialization (PR c/63480)


On 10/08/14 06:00, Marek Polacek wrote:
PR63480 points out that -Wmissing-field-initializers warns about
initializing with { }.  Given that we suppress the warning for
initializing with { 0 }, I think it makes sense to suppress it
for { } as well.
(Initializing with { } is a GNU extension and -pedantic warns on that.)

Bootstrapped/regtested on x86_64-linux, ok for trunk?

2014-10-08  Marek Polacek  <polacek@redhat.com>

	PR c/63480
	* c-typeck.c (pop_init_level): Don't warn about initializing
	with { }.

	* gcc.dg/pr63480.c: New test.
Ok.
jeff


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