Re: [PATCH] c++: Don't allow designated initializers with non-aggregates [PR95369]

2020-06-11 Thread Jason Merrill via Gcc-patches
On 6/11/20 5:28 PM, Marek Polacek wrote: On Thu, Jun 11, 2020 at 03:51:29PM -0400, Jason Merrill wrote: On 6/9/20 2:17 PM, Marek Polacek wrote: Another part of 95369 is that we accept designated initializers with non-aggregate types. That seems to be wrong since they're part of aggregate initi

Re: [PATCH] c++: Don't allow designated initializers with non-aggregates [PR95369]

2020-06-11 Thread Marek Polacek via Gcc-patches
On Thu, Jun 11, 2020 at 03:51:29PM -0400, Jason Merrill wrote: > On 6/9/20 2:17 PM, Marek Polacek wrote: > > Another part of 95369 is that we accept designated initializers with > > non-aggregate types. That seems to be wrong since they're part of > > aggregate initialization. clang/icc also reje

Re: [PATCH] c++: Don't allow designated initializers with non-aggregates [PR95369]

2020-06-11 Thread Jason Merrill via Gcc-patches
On 6/9/20 2:17 PM, Marek Polacek wrote: Another part of 95369 is that we accept designated initializers with non-aggregate types. That seems to be wrong since they're part of aggregate initialization. clang/icc also reject it. (Un)fortunately there are multiple contexts where we can use design

[PATCH] c++: Don't allow designated initializers with non-aggregates [PR95369]

2020-06-09 Thread Marek Polacek via Gcc-patches
Another part of 95369 is that we accept designated initializers with non-aggregate types. That seems to be wrong since they're part of aggregate initialization. clang/icc also reject it. (Un)fortunately there are multiple contexts where we can use designated initializers: function-like casts, me