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] Another initialization fix (PR c/63567)


On Sun, 19 Oct 2014, Marek Polacek wrote:

> It turned out that there is another spot where we need to allow
> initializing objects with static storage duration with compound
> literals even in C99 -- when the compound literal is inside the
> initializer.  Fixed in the same way as previously.
> 
> Bootstrapped/regtested on x86_64-linux, ok for trunk?
> 
> 2014-10-18  Marek Polacek  <polacek@redhat.com>
> 
> 	PR c/63567
> 	* c-typeck.c (output_init_element): Allow initializing objects with
> 	static storage duration with compound literals even in C99 and add
> 	pedwarn for it.
> 
> 	* gcc.dg/pr63567-3.c: New test.
> 	* gcc.dg/pr63567-4.c: New test.

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]