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 initialization.  clang/icc also reject it.

(Un)fortunately there are multiple contexts where we can use designated
initializers: function-like casts, member list initializers, NTTP, etc.
So I've adjusted multiple places in the compiler in order to to detect
this case and to provide a nice diagnostic, instead of an ugly raft of
errors.

Would it work to handle this only in add_list_candidates?

'fraid not -- we don't call add_list_candidates at all when compiling
desig16.C.

Hmm, why not?  What is turning the CONSTRUCTOR into an argument vec?

Jason

Reply via email to