Re: [C++ PATCH] Harmonize C++ flexible array member initialization with C (PR c++/80135, PR c++/81922)

2017-12-15 Thread Jakub Jelinek
On Fri, Dec 15, 2017 at 03:09:53PM -0500, Jason Merrill wrote: > So this change is because the caller is only interested in flexible arrays, > which can't be deeply nested anymore? In that case, this is no longer a Yes. > general purpose function and should be called find_flexarray_init. Done

Re: [C++ PATCH] Harmonize C++ flexible array member initialization with C (PR c++/80135, PR c++/81922)

2017-12-15 Thread Jason Merrill
On 12/08/2017 11:15 AM, Jakub Jelinek wrote: Hi! Martin's patch a few years ago started allowing flexible array members inside of nested aggregates, similarly to what we were doing in C. But C rejects cases where we in nested context try to initialize a flexible array member with a non-empty

Re: [C++ PATCH] Harmonize C++ flexible array member initialization with C (PR c++/80135, PR c++/81922)

2017-12-08 Thread Martin Sebor
On 12/08/2017 10:34 AM, Jakub Jelinek wrote: On Fri, Dec 08, 2017 at 10:25:48AM -0700, Martin Sebor wrote: While testing the patch I noticed it issues some diagnostics multiple times. It would be nice if the last (redundant) pedantic warning in the error case below could be avoided. You mean

Re: [C++ PATCH] Harmonize C++ flexible array member initialization with C (PR c++/80135, PR c++/81922)

2017-12-08 Thread Jakub Jelinek
On Fri, Dec 08, 2017 at 10:25:48AM -0700, Martin Sebor wrote: > While testing the patch I noticed it issues some diagnostics > multiple times. It would be nice if the last (redundant) > pedantic warning in the error case below could be avoided. You mean completely drop the pedwarn

Re: [C++ PATCH] Harmonize C++ flexible array member initialization with C (PR c++/80135, PR c++/81922)

2017-12-08 Thread Martin Sebor
On 12/08/2017 09:15 AM, Jakub Jelinek wrote: Hi! Martin's patch a few years ago started allowing flexible array members inside of nested aggregates, similarly to what we were doing in C. But C rejects cases where we in nested context try to initialize a flexible array member with a non-empty

[C++ PATCH] Harmonize C++ flexible array member initialization with C (PR c++/80135, PR c++/81922)

2017-12-08 Thread Jakub Jelinek
Hi! Martin's patch a few years ago started allowing flexible array members inside of nested aggregates, similarly to what we were doing in C. But C rejects cases where we in nested context try to initialize a flexible array member with a non-empty initializer, because that is something that can't