Re: Fix c/69522, memory management issue in c-parser

2016-02-18 Thread Bernd Schmidt
On 02/18/2016 12:22 PM, Marek Polacek wrote: On Thu, Feb 18, 2016 at 11:53:04AM +0100, Christophe Lyon wrote: FWIW, I'm seeing the new test failing on the 4.9 branch: gcc/testsuite/gcc.dg/pr69522.c:2:8: error: struct has no members [-Wpedantic] gcc/testsuite/gcc.dg/pr69522.c:9:8: error: ISO C fo

Re: Fix c/69522, memory management issue in c-parser

2016-02-18 Thread Marek Polacek
On Thu, Feb 18, 2016 at 11:53:04AM +0100, Christophe Lyon wrote: > FWIW, I'm seeing the new test failing on the 4.9 branch: > gcc/testsuite/gcc.dg/pr69522.c:2:8: error: struct has no members [-Wpedantic] > gcc/testsuite/gcc.dg/pr69522.c:9:8: error: ISO C forbids empty > initializer braces [-Wpedant

Re: Fix c/69522, memory management issue in c-parser

2016-02-18 Thread Christophe Lyon
On 16 February 2016 at 16:37, Jeff Law wrote: > On 02/16/2016 07:21 AM, Bernd Schmidt wrote: >> >> On 02/08/2016 05:30 PM, Jeff Law wrote: >>> >>> On 01/29/2016 04:40 AM, Bernd Schmidt wrote: c/ PR c/69522 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All

Re: Fix c/69522, memory management issue in c-parser

2016-02-16 Thread Jeff Law
On 02/16/2016 07:21 AM, Bernd Schmidt wrote: On 02/08/2016 05:30 PM, Jeff Law wrote: On 01/29/2016 04:40 AM, Bernd Schmidt wrote: c/ PR c/69522 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All callers changed. If nested_p is true, use it to call finish_implicit_

Re: Fix c/69522, memory management issue in c-parser

2016-02-16 Thread Bernd Schmidt
On 02/08/2016 05:30 PM, Jeff Law wrote: On 01/29/2016 04:40 AM, Bernd Schmidt wrote: c/ PR c/69522 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All callers changed. If nested_p is true, use it to call finish_implicit_inits. * c-tree.h (finish_implicit_inits):

Re: Fix c/69522, memory management issue in c-parser

2016-02-12 Thread Marek Polacek
On Fri, Feb 12, 2016 at 02:28:39PM +0100, Bernd Schmidt wrote: > On 02/12/2016 02:26 PM, Marek Polacek wrote: > >On Fri, Feb 12, 2016 at 02:17:19PM +0100, Andreas Schwab wrote: > >>FAIL: gcc.dg/pr69522.c (test for excess errors) > >>Excess errors: > >>/daten/aranym/gcc/gcc-20160212/gcc/testsuite/gc

Re: Fix c/69522, memory management issue in c-parser

2016-02-12 Thread Bernd Schmidt
On 02/12/2016 02:26 PM, Marek Polacek wrote: On Fri, Feb 12, 2016 at 02:17:19PM +0100, Andreas Schwab wrote: FAIL: gcc.dg/pr69522.c (test for excess errors) Excess errors: /daten/aranym/gcc/gcc-20160212/gcc/testsuite/gcc.dg/pr69522.c:2:8: error: struct has no members [-Wpedantic] /daten/aranym/

Re: Fix c/69522, memory management issue in c-parser

2016-02-12 Thread Marek Polacek
On Fri, Feb 12, 2016 at 02:17:19PM +0100, Andreas Schwab wrote: > FAIL: gcc.dg/pr69522.c (test for excess errors) > Excess errors: > /daten/aranym/gcc/gcc-20160212/gcc/testsuite/gcc.dg/pr69522.c:2:8: error: > struct has no members [-Wpedantic] > /daten/aranym/gcc/gcc-20160212/gcc/testsuite/gcc.dg/

Re: Fix c/69522, memory management issue in c-parser

2016-02-12 Thread Andreas Schwab
FAIL: gcc.dg/pr69522.c (test for excess errors) Excess errors: /daten/aranym/gcc/gcc-20160212/gcc/testsuite/gcc.dg/pr69522.c:2:8: error: struct has no members [-Wpedantic] /daten/aranym/gcc/gcc-20160212/gcc/testsuite/gcc.dg/pr69522.c:9:8: error: ISO C forbids empty initializer braces [-Wpedantic]

Re: Fix c/69522, memory management issue in c-parser

2016-02-08 Thread Jeff Law
On 01/29/2016 04:40 AM, Bernd Schmidt wrote: Let's say we have struct a { int x[1]; int y[1]; } x = { 0, { 0 } }; ^ When we reach the marked brace, we call into push_init_level, where we notice that we have implicit initializers (for x[]) lying around that we should deal with no

Re: Fix c/69522, memory management issue in c-parser

2016-02-05 Thread Bernd Schmidt
Ping. On 01/29/2016 12:40 PM, Bernd Schmidt wrote: Let's say we have struct a { int x[1]; int y[1]; } x = { 0, { 0 } }; ^ When we reach the marked brace, we call into push_init_level, where we notice that we have implicit initializers (for x[]) lying around that we should deal

Fix c/69522, memory management issue in c-parser

2016-01-29 Thread Bernd Schmidt
Let's say we have struct a { int x[1]; int y[1]; } x = { 0, { 0 } }; ^ When we reach the marked brace, we call into push_init_level, where we notice that we have implicit initializers (for x[]) lying around that we should deal with now that we've seen another open brace. The probl